"L. Spiro Engine"
Public Member Functions | Static Public Member Functions | Public Attributes

lsm::CPlane3Base< _tType, _tVec3Type > Class Template Reference

A template for any type of 3D plane. More...

#include <LSMPlane3Base.h>

List of all members.

Public Member Functions

LSE_INLINE LSE_CALLCTOR CPlane3Base (const CPlane3Base< _tType, _tVec3Type > &_pPlane)
LSE_INLINE LSE_CALLCTOR CPlane3Base (const _tVec3Type &_vPoint0, const _tVec3Type &_vPoint1, const _tVec3Type &_vPoint2)
LSE_INLINE LSE_CALLCTOR CPlane3Base (const _tVec3Type &_vNormal, _tType _fDistance)
LSE_INLINE LSE_CALLCTOR CPlane3Base (const _tVec3Type &_vPoint, const _tVec3Type &_vNormal)
CPlane3Base< _tType,
_tVec3Type > &LSE_FCALL 
operator= (const CPlane3Base< _tType, _tVec3Type > &_pPlane)
LSBOOL LSE_CALL operator== (const CPlane3Base< _tType, _tVec3Type > &_pOther) const
CPlane3Base< _tType,
_tVec3Type > LSE_CALL 
operator- () const
LSE_INLINE _tType LSE_FCALL SignedDistance (const _tVec3Type &_vPoint) const
LSE_INLINE _tType LSE_FCALL SignedDistanceNonNormal (const _tVec3Type &_vPoint) const
LSE_INLINE _tVec3Type LSE_FCALL ProjectPointToPlane (const _tVec3Type &_vPoint) const
LSE_INLINE _tVec3Type LSE_FCALL ClosestPointOnPlane (const _tVec3Type &_vPoint) const
LSE_INLINE _tVec3Type LSE_FCALL ClosestPointOnNonNormalPlane (const _tVec3Type &_vPoint) const
LSE_INLINE LSVOID LSE_FCALL Normalize ()

Static Public Member Functions

static LSBOOL LSE_CALL PlanesFormConvexEdge (const CPlane3Base< _tType, _tVec3Type > &_pbLeft, const CPlane3Base< _tType, _tVec3Type > &_pbRight, _tType _tEpsilon)

Public Attributes

_tVec3Type n
_tType dist

Detailed Description

template<typename _tType, typename _tVec3Type>
class lsm::CPlane3Base< _tType, _tVec3Type >

A template for any type of 3D plane.

Class CPlane3BaseBase Description: A template for any type of 3D plane.


Member Function Documentation

template<typename _tType, typename _tVec3Type>
LSE_INLINE _tVec3Type LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::ClosestPointOnNonNormalPlane ( const _tVec3Type &  _vPoint) const [inline]

Returns the closest point on this plane to the given point. This plane does not need to be normalized.

Parameters:
_vPointThe point to use as a reference for determining the point on this plane to return.
Returns:
Returns the closest point on this plane to the given point. This plane must be normalized.
template<typename _tType, typename _tVec3Type>
LSE_INLINE _tVec3Type LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::ClosestPointOnPlane ( const _tVec3Type &  _vPoint) const [inline]

Returns the closest point on this plane to the given point. This plane must be normalized.

Parameters:
_vPointThe point to use as a reference for determining the point on this plane to return.
Returns:
Returns the closest point on this plane to the given point. This plane must be normalized.
template<typename _tType, typename _tVec3Type>
LSE_INLINE LSVOID LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::Normalize ( ) [inline]

Normalize this plane.

Reimplemented in lsm::CPlane3.

template<typename _tType, typename _tVec3Type>
CPlane3Base<_tType, _tVec3Type> LSE_CALL lsm::CPlane3Base< _tType, _tVec3Type >::operator- ( ) const [inline]

Negation operaor.

Returns:
Returns the negated form of this plane.
template<typename _tType, typename _tVec3Type>
CPlane3Base<_tType, _tVec3Type>& LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::operator= ( const CPlane3Base< _tType, _tVec3Type > &  _pPlane) [inline]

Copy the given plane into this one.

Parameters:
_pPlaneThe plane to copy.
Returns:
Returns this plane after the copy.
template<typename _tType, typename _tVec3Type>
LSBOOL LSE_CALL lsm::CPlane3Base< _tType, _tVec3Type >::operator== ( const CPlane3Base< _tType, _tVec3Type > &  _pOther) const [inline]

Equality operator.

Parameters:
_pOtherThe plane against which to check for equality.
Returns:
Returns true if the planes are exactly equal.
template<typename _tType, typename _tVec3Type>
static LSBOOL LSE_CALL lsm::CPlane3Base< _tType, _tVec3Type >::PlanesFormConvexEdge ( const CPlane3Base< _tType, _tVec3Type > &  _pbLeft,
const CPlane3Base< _tType, _tVec3Type > &  _pbRight,
_tType  _tEpsilon 
) [inline, static]

Gets the cosine of the angle between 2 intersecting planes. If the planes do not intersect, false is returned.

Parameters:
_pbLeftThe left plane.
_pbRightThe right plane.
_tRetHolds the returned value if the result is true.
_tEpsilonEpsilon to use for the test.
Returns:
Returns true if the planes intersect.
template<typename _tType, typename _tVec3Type>
LSE_INLINE _tVec3Type LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::ProjectPointToPlane ( const _tVec3Type &  _vPoint) const [inline]

Project the given point into this plane. This plane must be normalized.

Parameters:
_vPointThe point to project onto this plane.
Returns:
Returns the point projected onto this plane.
template<typename _tType, typename _tVec3Type>
LSE_INLINE _tType LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::SignedDistance ( const _tVec3Type &  _vPoint) const [inline]

Get the distance from this plane to a point. This plane must be normalized.

Parameters:
_vPointPoint from which to get the distance to this plane.
Returns:
Returns the distance from the point to this plane, signed.
template<typename _tType, typename _tVec3Type>
LSE_INLINE _tType LSE_FCALL lsm::CPlane3Base< _tType, _tVec3Type >::SignedDistanceNonNormal ( const _tVec3Type &  _vPoint) const [inline]

Get the distance from this plane to a point. This plane does not need to be normalized.

Parameters:
_vPointPoint from which to get the distance to this plane.
Returns:
Returns the distance from the point to this plane, signed.

Member Data Documentation

template<typename _tType, typename _tVec3Type>
_tType lsm::CPlane3Base< _tType, _tVec3Type >::dist

Plane distance, signed.

template<typename _tType, typename _tVec3Type>
_tVec3Type lsm::CPlane3Base< _tType, _tVec3Type >::n

Plane normal.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator