Library of Assembled Shared Sources
lass::prim::impl::Plane3DCombined< T, NormalizingPolicy > Class Template Reference

implementation of plane 3d with both cartesian and parametric equation, and plus extra reciprocal vectors and board. More...

#include <plane_3d_combined.h>

Inheritance diagram for lass::prim::impl::Plane3DCombined< T, NormalizingPolicy >:

Public Member Functions

 Plane3DCombined ()
 initializes to an invalid state.
 
 Plane3DCombined (const TPoint &iSupport, const TPoint &iPointU, const TPoint &iPointV)
 Construct a plane through three points.
 
 Plane3DCombined (const TPoint &iSupport, const TVector &iDirectionU, const TVector &iDirectionV)
 construct a plane through a support point and by two direction vectors.
 
 Plane3DCombined (const TVector &iNormal, const TPoint &iSupport)
 Construct a plane through a support point and by a normal vector.
 
 Plane3DCombined (const TVector &iNormal, TParam iD)
 Construct a plane by a cartesian equation N.P + d == 0.
 
const TPointsupport () const
 return support point.
 
void getDirections (TVector &oDirectionU, TVector &oDirectionV) const
 return U and V direction vectors
 
const TVectordirectionU () const
 return U direction vector.
 
const TVectordirectionV () const
 return V direction vector.
 
void getReciprocals (TVector &oReciprocalU, TVector &oReciprocalV) const
 return reciprocal vectors for U and V direction vectors
 
const TVectorreciprocalU () const
 return reciprocal for U direction vector.
 
const TVectorreciprocalV () 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).
 

Detailed Description

template<typename T, class NormalizingPolicy = Normalized>
class lass::prim::impl::Plane3DCombined< T, NormalizingPolicy >

implementation of plane 3d with both cartesian and parametric equation, and plus extra reciprocal vectors and board.

Author
Bram de Greve [BdG]

Definition at line 67 of file plane_3d_combined.h.

Constructor & Destructor Documentation

◆ Plane3DCombined() [1/4]

template<typename T, class NP>
lass::prim::impl::Plane3DCombined< T, NP >::Plane3DCombined ( const TPoint & iSupport,
const TPoint & iPointU,
const TPoint & iPointV )

Construct a plane through three points.

  • support point S is given by the first point iSupport.
  • direction vectors U and V are choosen from iSupport to iPointU and iPointV respectively (U = iPointU - iSupport, V = iPointV - iSupport).
  • normal vector N is given by the cross product N = U x V.
  • value d is choosen so that the support point is indeed a point of the plane.

Definition at line 85 of file plane_3d_combined.inl.

◆ Plane3DCombined() [2/4]

template<typename T, class NP>
lass::prim::impl::Plane3DCombined< T, NP >::Plane3DCombined ( const TPoint & iSupport,
const TVector & iDirectionU,
const TVector & iDirectionV )

construct a plane through a support point and by two direction vectors.

  • support point S is given by the point iSupport.
  • direction vectors U and V are given by iDirectionU and iDirectionV.
  • normal vector N is given by the cross product N = U x V.
  • value d is choosen so that the support point is indeed a point of the plane.

Definition at line 108 of file plane_3d_combined.inl.

◆ Plane3DCombined() [3/4]

template<typename T, class NP>
lass::prim::impl::Plane3DCombined< T, NP >::Plane3DCombined ( const TVector & iNormal,
const TPoint & iSupport )

Construct a plane through a support point and by a normal vector.

  • support point S is given by the point iSupport.
  • normal vector N is given by the vector iNormal.
  • direction vectors U and V are automatically generated so that N == U x V.
  • value d is choosen so that the support point is indeed a point of the plane.

Definition at line 131 of file plane_3d_combined.inl.

References lass::prim::impl::Plane3DImplDetail::generateDirections(), and lass::prim::impl::Plane3DImplDetail::generateReciprocal().

◆ Plane3DCombined() [4/4]

template<typename T, class NP>
lass::prim::impl::Plane3DCombined< T, NP >::Plane3DCombined ( const TVector & iNormal,
TParam iD )

Construct a plane by a cartesian equation N.P + d == 0.

  • normal vector N is given by the vector iNormal.
  • value d is given by the value iD.
  • support point S automatically generated so that N.S + d == 0.
  • direction vectors U and V are automatically generated so that N == U x V.

Definition at line 152 of file plane_3d_combined.inl.

References lass::prim::impl::Plane3DImplDetail::generateDirections(), and lass::prim::impl::Plane3DImplDetail::generateReciprocal().

Member Function Documentation

◆ reject() [1/2]

template<typename T, class NP>
const Plane3DCombined< T, NP >::TVector lass::prim::impl::Plane3DCombined< 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 292 of file plane_3d_combined.inl.

References equation().

Referenced by project(), project(), reflect(), and reflect().

◆ reject() [2/2]

template<typename T, class NP>
const Plane3DCombined< T, NP >::TVector lass::prim::impl::Plane3DCombined< 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 305 of file plane_3d_combined.inl.


The documentation for this class was generated from the following files: