25 #ifndef _SpVolume_h_Included_
26 #define _SpVolume_h_Included_
47 PlaneImpl(
const PlaneImpl &pl2) : m_origin(pl2.m_origin), m_normal(pl2.m_normal), m_dist(pl2.m_dist) { }
50 m_origin = pl2.m_origin; m_normal = pl2.m_normal; m_dist = pl2.m_dist;
69 a = m_normal.
x; b = m_normal.
y; c = m_normal.
z; d = m_dist;
82 if (
source.m_planeValid[npl])
88 double xFov,
double yFov,
bool xFovAsAspect =
false,
bool yFovAsAspect =
false,
89 bool bNearPlane =
false,
double fNearPlane = 0.01,
90 bool bFarPlane =
false,
double fFarPlane = 1.0 );
114 return 2.0 * (len * tan(fov * 0.5));
118 return atan(plane / len * .5) * 2.0;
142 pt[0] = (pl[0] > 0.0) ?
max.x :
min.x;
143 pt[1] = (pl[1] > 0.0) ?
max.y :
min.y;
144 pt[2] = (pl[2] > 0.0) ?
max.z :
min.z;
145 return pl[0] * pt[0] + pl[1] * pt[1] + pl[2] * pt[2] + pl[3] >= -
tol.equalVector();
151 double xFov,
double yFov,
bool xFovAsAspect,
bool yFovAsAspect,
152 bool bNearPlane,
double fNearPlane,
153 bool bFarPlane,
double fFarPlane )
157 double nearPlane_ =
odmax(fNearPlane, 1.0);
158 double planeWidth = 1., planeHeight = 1.;
164 planeWidth = xFov * planeHeight;
166 planeHeight = planeWidth / yFov;
171 OdGePoint3d nearPlane = origin + basisZ * nearPlane_;
174 nearPlane - deltaX - deltaY,
175 nearPlane + deltaX - deltaY,
176 nearPlane + deltaX + deltaY,
177 nearPlane - deltaX + deltaY
183 if (bNearPlane || bFarPlane)
187 m_plane[4].
set(origin + basisZ * fNearPlane, basisZ);
191 m_plane[5].
set(origin + basisZ * fFarPlane, -basisZ);
241 #endif // _SpVolume_h_Included_