Library of Assembled Shared Sources
|
implementation of plane 3d with a cartesian equation More...
#include <plane_3d_cartesian.h>
Public Member Functions | |
Plane3DCartesian () | |
initializes to an invalid state. | |
Plane3DCartesian (const TPoint &iSupport, const TPoint &iPointU, const TPoint &iPointV) | |
Construct a plane through three points. | |
Plane3DCartesian (const TPoint &iSupport, const TVector &iDirectionU, const TVector &iDirectionV) | |
construct a plane through a support point and by two direction vectors. | |
Plane3DCartesian (const TVector &iNormal, const TPoint &iSupport) | |
Construct a plane through a support point and by a normal vector. | |
Plane3DCartesian (const TVector &iNormal, TParam iD) | |
Construct a plane by a cartesian equation N.P + d == 0. | |
const TPoint | support () const |
return support point. | |
void | getDirections (TVector &oDirectionU, TVector &oDirectionV) const |
return U and V direction vectors | |
const TVector | directionU () const |
return U direction vector. | |
const TVector | directionV () const |
return V direction vector. | |
void | getReciprocals (TVector &oReciprocalU, TVector &oReciprocalV) const |
return reciprocal vectors for U and V direction vectors | |
const TVector | reciprocalU () const |
return reciprocal for U direction vector. | |
const TVector | reciprocalV () const |
return reciprocal for V direction vector. | |
const TValue | equation (const TPoint &iPoint) const |
Return value of point in equation. | |
const TValue | equation (const TPoint &iPoint, TParam iRelativeTolerance) const |
Return value of point in equation. | |
const TVector | reject (const TPoint &iPoint) const |
return the vector that, if added to the PROJECTION of iPoint, you get iPoint again. | |
const TVector | reject (const TVector &iVector) const |
return the part of iVector that is orthogonal to the plane. | |
const TPoint | project (const TPoint &iPoint) const |
project a point orthogonally onto the plane | |
const TVector | project (const TVector &iVector) const |
project a vector orthogonally onto the plane | |
const TPoint | reflect (const TPoint &iPoint) const |
reflect a point orthogonally into the plane. | |
const TVector | reflect (const TVector &iVector) const |
reflect a vector orthogonally into the plane | |
const TPoint | point (TParam iU, TParam iV) const |
return point by filling in the parametric equation: P(u, v) = S + u * U + v * V | |
const TPoint | point (const TUV &iUV) const |
return point by filling in the parametric equation: P(u, v) = S + u * U + v * V | |
const TUV | uv (const TPoint &iPoint) const |
return UV pair of parameters | |
bool | isValid () const |
return true if plane is a valid plane (no normal or direction vectors that are zero). | |
implementation of plane 3d with a cartesian equation
The implementation of this class uses the cartesian equation a * x + b * y + c * z + d == 0.
then at the end, directionV and directionV will probably not be the same as at first. This is because the plane will only create a normal vector based on the direction vectors, and then forget about them. If you ask to get the direction vectors, it has to create new ones.
Definition at line 83 of file plane_3d_cartesian.h.
lass::prim::impl::Plane3DCartesian< T, NP >::Plane3DCartesian | ( | const TPoint & | iSupport, |
const TPoint & | iPointU, | ||
const TPoint & | iPointV ) |
Construct a plane through three points.
Definition at line 77 of file plane_3d_cartesian.inl.
References lass::prim::impl::Plane3DImplDetail::generateCartesian().
lass::prim::impl::Plane3DCartesian< T, NP >::Plane3DCartesian | ( | const TPoint & | iSupport, |
const TVector & | iDirectionU, | ||
const TVector & | iDirectionV ) |
construct a plane through a support point and by two direction vectors.
Definition at line 93 of file plane_3d_cartesian.inl.
References lass::prim::impl::Plane3DImplDetail::generateCartesian().
lass::prim::impl::Plane3DCartesian< T, NP >::Plane3DCartesian | ( | const TVector & | iNormal, |
const TPoint & | iSupport ) |
Construct a plane through a support point and by a normal vector.
Definition at line 108 of file plane_3d_cartesian.inl.
lass::prim::impl::Plane3DCartesian< T, NP >::Plane3DCartesian | ( | const TVector & | iNormal, |
TParam | iD ) |
Construct a plane by a cartesian equation N.P + d == 0.
Definition at line 122 of file plane_3d_cartesian.inl.
const Plane3DCartesian< T, NP >::TVector lass::prim::impl::Plane3DCartesian< T, NP >::reject | ( | const TPoint & | iPoint | ) | const |
return the vector that, if added to the PROJECTION of iPoint, you get iPoint again.
iPoint == (almost) project(iPoint) + reject(iPoint)
Definition at line 272 of file plane_3d_cartesian.inl.
References equation().
Referenced by project(), project(), reflect(), and reflect().
const Plane3DCartesian< T, NP >::TVector lass::prim::impl::Plane3DCartesian< T, NP >::reject | ( | const TVector & | iVector | ) | const |
return the part of iVector that is orthogonal to the plane.
it's the vector that, if added to the PROJECTION of iVector, you get iVector again. iVector == (almost) project(iVector) + reject(iVector).
Definition at line 285 of file plane_3d_cartesian.inl.