library of assembled shared sources

http://lass.cocamware.com

lass::prim::impl::Plane3DParametric< T, NormalizingPolicy > Class Template Reference

implementation of lass::prim::Plane3D with a parametric equation More...

#include <plane_3d_parametric.h>

Collaboration diagram for lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >:

Collaboration graph
[legend]

Public Types

enum  { dimension = TPoint::dimension }
typedef NormalizingPolicy TNormalizingPolicy
typedef Point3D< T > TPoint
typedef TPoint::TVector TVector
typedef Point2D< T > TUV
typedef TPoint::TValue TValue
typedef TPoint::TParam TParam
typedef TPoint::TReference TReference
typedef TPoint::TConstReference TConstReference
typedef TPoint::TNumTraits TNumTraits

Public Member Functions

 Plane3DParametric ()
 initializes to an invalid state.
 Plane3DParametric (const TPoint &iSupport, const TPoint &iPointU, const TPoint &iPointV)
 Construct a plane through three points.
 Plane3DParametric (const TPoint &iSupport, const TVector &iDirectionU, const TVector &iDirectionV)
 construct a plane through a support point and by two direction vectors.
 Plane3DParametric (const TVector &iNormal, const TPoint &iSupport)
 Construct a plane through a support point and by a normal vector.
 Plane3DParametric (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 TVector reciprocalU () const
 return reciprocal for U direction vector.
const TVector reciprocalV () const
 return reciprocal for V direction vector.
void getCartesian (TVector &oNormal, TReference oD) const
const TVector normal () const
const TValue d () const
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
void flip ()
const bool isValid () const
 return true if plane is a valid plane (no direction vector is zero and they're not colinear.

Private Attributes

TPoint support_
TVector directionU_
TVector directionV_

Detailed Description

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

implementation of lass::prim::Plane3D with a parametric equation

Author:
Bram de Greve [BdG]
This implementation of the plane uses the parametric equation P(u, v) = S + u * U + v * V. with S a support point, U and V two direction vectors, and u and v two parameters.

Warning:
currently, the plane will not automatically orthonormalize the direction vectors. There is a normalizing policy, but that's only for normalizing vectors, not for orthogonalizing two direction vectors. IF SOMEONE IS USING THIS PARAMETRIC PLANE CLASS AND RUNS IN SOME TROUBLES ON THIS, PLEASE CONTACT ME SO WE CAN WORK OUT A SOLUTION. Bram de Greve.

Definition at line 72 of file plane_3d_parametric.h.


Member Typedef Documentation

template<typename T , class NormalizingPolicy = Normalized>
typedef NormalizingPolicy lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TNormalizingPolicy

Definition at line 76 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef Point3D<T> lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TPoint

Definition at line 78 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TVector lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TVector

Definition at line 79 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef Point2D<T> lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TUV

Definition at line 80 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TValue lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TValue

Definition at line 82 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TParam lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TParam

Definition at line 83 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TReference lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TReference

Definition at line 84 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TConstReference lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TConstReference

Definition at line 85 of file plane_3d_parametric.h.

template<typename T , class NormalizingPolicy = Normalized>
typedef TPoint::TNumTraits lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::TNumTraits

Definition at line 86 of file plane_3d_parametric.h.


Member Enumeration Documentation

template<typename T , class NormalizingPolicy = Normalized>
anonymous enum

Enumerator:
dimension 

Definition at line 88 of file plane_3d_parametric.h.


Constructor & Destructor Documentation

template<typename T , class NP >
lass::prim::impl::Plane3DParametric< T, NP >::Plane3DParametric (  )  [inline]

initializes to an invalid state.

Definition at line 63 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::isValid(), and LASS_ASSERT.

template<typename T , class NP >
lass::prim::impl::Plane3DParametric< T, NP >::Plane3DParametric ( const TPoint iSupport,
const TPoint iPointU,
const TPoint iPointV 
) [inline]

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).

Definition at line 79 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_, and lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_.

template<typename T , class NP >
lass::prim::impl::Plane3DParametric< T, NP >::Plane3DParametric ( const TPoint iSupport,
const TVector iDirectionU,
const TVector iDirectionV 
) [inline]

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.

Definition at line 97 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_, and lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_.

template<typename T , class NP >
lass::prim::impl::Plane3DParametric< T, NP >::Plane3DParametric ( const TVector iNormal,
const TPoint iSupport 
) [inline]

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

  • support point S is given by the point iSupport.
  • direction vectors U and V are automatically generated so that N == U x V.

Definition at line 115 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_, lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_, and lass::prim::impl::Plane3DImplDetail::generateDirections().

template<typename T , class NP >
lass::prim::impl::Plane3DParametric< T, NP >::Plane3DParametric ( const TVector iNormal,
TParam  iD 
) [inline]

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

  • 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 130 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_, lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_, and lass::prim::impl::Plane3DImplDetail::generateDirections().


Member Function Documentation

template<typename T , class NP >
const Plane3DParametric< T, NP >::TPoint & lass::prim::impl::Plane3DParametric< T, NP >::support (  )  const [inline]

return support point.

Definition at line 143 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::support_.

template<typename T , class NP >
void lass::prim::impl::Plane3DParametric< T, NP >::getDirections ( TVector oDirectionU,
TVector oDirectionV 
) const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector & lass::prim::impl::Plane3DParametric< T, NP >::directionU (  )  const [inline]

return U direction vector.

Definition at line 164 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_.

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector & lass::prim::impl::Plane3DParametric< T, NP >::directionV (  )  const [inline]

return V direction vector.

Definition at line 174 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_.

template<typename T , class NP >
void lass::prim::impl::Plane3DParametric< T, NP >::getReciprocals ( TVector oReciprocalU,
TVector oReciprocalV 
) const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::reciprocalU (  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::reciprocalV (  )  const [inline]

template<typename T , class NP >
void lass::prim::impl::Plane3DParametric< T, NP >::getCartesian ( TVector oNormal,
TReference  oD 
) const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::normal (  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TValue lass::prim::impl::Plane3DParametric< T, NP >::d (  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TValue lass::prim::impl::Plane3DParametric< T, NP >::equation ( const TPoint iPoint  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TValue lass::prim::impl::Plane3DParametric< T, NP >::equation ( const TPoint iPoint,
TParam  iRelativeTolerance 
) const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::reject ( const TPoint iPoint  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::reject ( const TVector iVector  )  const [inline]

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 299 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::d(), lass::prim::dot(), lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::getCartesian(), and lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::normal().

template<typename T , class NP >
const Plane3DParametric< T, NP >::TPoint lass::prim::impl::Plane3DParametric< T, NP >::project ( const TPoint iPoint  )  const [inline]

project a point orthogonally onto the plane

Definition at line 313 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::reject().

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::project ( const TVector iVector  )  const [inline]

project a vector orthogonally onto the plane

Definition at line 324 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::reject().

template<typename T , class NP >
const Plane3DParametric< T, NP >::TPoint lass::prim::impl::Plane3DParametric< T, NP >::reflect ( const TPoint iPoint  )  const [inline]

reflect a point orthogonally into the plane.

Definition at line 335 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::reject().

template<typename T , class NP >
const Plane3DParametric< T, NP >::TVector lass::prim::impl::Plane3DParametric< T, NP >::reflect ( const TVector iVector  )  const [inline]

reflect a vector orthogonally into the plane

Definition at line 346 of file plane_3d_parametric.inl.

References lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::reject().

template<typename T , class NP >
const Plane3DParametric< T, NP >::TPoint lass::prim::impl::Plane3DParametric< T, NP >::point ( TParam  iU,
TParam  iV 
) const [inline]

return point by filling in the parametric equation: P(u, v) = S + u * U + v * V

Definition at line 357 of file plane_3d_parametric.inl.

template<typename T , class NP >
const Plane3DParametric< T, NP >::TPoint lass::prim::impl::Plane3DParametric< T, NP >::point ( const TUV iUV  )  const [inline]

template<typename T , class NP >
const Plane3DParametric< T, NP >::TUV lass::prim::impl::Plane3DParametric< T, NP >::uv ( const TPoint iPoint  )  const [inline]

template<typename T , class NP >
void lass::prim::impl::Plane3DParametric< T, NP >::flip (  )  [inline]

template<typename T , class NP >
const bool lass::prim::impl::Plane3DParametric< T, NP >::isValid (  )  const [inline]


Field Documentation

template<typename T , class NormalizingPolicy = Normalized>
TPoint lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::support_ [private]

template<typename T , class NormalizingPolicy = Normalized>
TVector lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionU_ [private]

template<typename T , class NormalizingPolicy = Normalized>
TVector lass::prim::impl::Plane3DParametric< T, NormalizingPolicy >::directionV_ [private]


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

Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo