45#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_PLANE_3D_INL
46#define LASS_GUARDIAN_OF_INCLUSION_PRIM_PLANE_3D_INL
58template<
typename T,
typename EP,
typename NP>
59Plane3D<T, EP, NP>::Plane3D():
67template<
typename T,
typename EP,
typename NP>
68Plane3D<T, EP, NP>::Plane3D(
const TPoint& iSupport,
69 const TPoint& iPointU,
70 const TPoint& iPointV):
71 TImpl(iSupport, iPointU, iPointV)
77template<
typename T,
typename EP,
typename NP>
78Plane3D<T, EP, NP>::Plane3D(
const TPoint& iSupport,
80 const TVector& iDirV):
81 TImpl(iSupport, iDirU, iDirV)
87template<
typename T,
typename EP,
typename NP>
88Plane3D<T, EP, NP>::Plane3D(
const TVector& iNormal,
const TPoint& iSupport):
89 TImpl(iNormal, iSupport)
95template<
typename T,
typename EP,
typename NP>
96Plane3D<T, EP, NP>::Plane3D(
const TVector& iNormal, TParam iD):
105template<
typename T,
typename EP,
typename NP>
108 const TValue eq = this->
equation(iPoint);
117template<
typename T,
typename EP,
typename NP>
118const typename Plane3D<T, EP, NP>::TValue
121 return NP::divideByNorm(this->
equation(iPoint), this->normal());
128template<
typename T,
typename EP,
typename NP>
129const typename Plane3D<T, EP, NP>::TValue
139template<
typename T,
typename EP,
typename NP>
142 const TValue eq = this->
equation(iPoint, iRelativeTolerance);
151template<
typename T,
typename EP,
typename NP>
152const typename Plane3D<T, EP, NP>::TValue
155 return NP::divideByNorm(
equation(iPoint, iRelativeTolerance), this->normal());
162template<
typename T,
typename EP,
typename NP>
163const typename Plane3D<T, EP, NP>::TValue
178template<
typename T,
typename EP,
typename NP>
181 const TVector absNormal = this->normal().transform(
num::abs);
182 if (absNormal.x > absNormal.y && absNormal.x > absNormal.z)
186 else if (absNormal.y > absNormal.z)
216 LASS_ENFORCE_STREAM(ioOStream)
218 <<
"<normal>" << iPlane.normal() <<
"</normal>\n"
219 <<
"<d>" << iPlane.d() <<
"</d>\n"
232 LASS_ENFORCE_STREAM(ioOStream)
234 <<
"<support>" << iPlane.support() <<
"</support>\n"
235 <<
"<directionU>" << iPlane.directionU() <<
"</directionU>\n"
236 <<
"<directionV>" << iPlane.directionV() <<
"</directionV>\n"
247io::XmlOStream& operator<<(io::XmlOStream& ioOStream,
const Plane3D<T, Combined>& iPlane)
249 LASS_ENFORCE_STREAM(ioOStream)
251 <<
"<support>" << iPlane.support() <<
"</support>\n"
252 <<
"<directionU>" << iPlane.directionU() <<
"</directionU>\n"
253 <<
"<directionV>" << iPlane.directionV() <<
"</directionV>\n"
254 <<
"<normal>" << iPlane.normal() <<
"</normal>\n"
255 <<
"<d>" << iPlane.d() <<
"</d>\n"
Output stream for writing a selection of geometric primitives to XML files.
const TValue signedDistance(const TPoint &iPoint) const
Return signed distance of point to plane.
const TValue squaredDistance(const TPoint &iPoint) const
Return squared distance of point to plane.
Side classify(const TPoint &iPoint) const
Return on what side a point is located.
const XYZ majorAxis() const
determines the major axis of the normal vector.
cyclic iterator over xyz indices
const TValue equation(const TPoint &iPoint) const
Return value of point in equation.
T sqr(const T &x)
return x * x
T abs(const T &x)
if x < 0 return -x, else return x.
set of geometrical primitives
Side
Different sides of a surface.
@ sFront
in front of the surface
@ sBack
in back of the surface
@ sSurface
right on the surface
Library for Assembled Shared Sources.