"L. Spiro Engine"
Static Public Member Functions

lsp::CIntersect Class Reference

Performs intersection tests between various primitive types. More...

#include <LSPIntersect.h>

List of all members.

Static Public Member Functions

template<typename _tType , typename _tPlaneType , typename _tVecType >
static LSE_INLINE LSBOOL LSE_CALL ThreePlanes (const _tPlaneType &_pP0, const _tPlaneType &_pP1, const _tPlaneType &_pP2, _tVecType &_vRet)
template<typename _tType , typename _tPlaneType , typename _tRayType >
static LSE_INLINE LSBOOL LSE_CALL TwoPlanes (const _tPlaneType &_pP0, const _tPlaneType &_pP1, _tRayType &_rRay)
template<typename _tType , typename _tVecType , typename _tPlaneType >
static LSE_INLINE LSBOOL LSE_CALL LineSegPlane (const _tVecType &_vStart, const _tVecType &_vEnd, const _tPlaneType &_pPlane, _tType &_fT, _tVecType &_vRet)
template<typename _tType , typename _tVecType , typename _tPlaneType >
static LSE_INLINE LSVOID LSE_CALL LineSegPlaneFast (const _tVecType &_vStart, const _tVecType &_vEnd, const _tPlaneType &_pPlane, _tVecType &_vRet)

Detailed Description

Performs intersection tests between various primitive types.

Class CIntersect Description: Performs intersection tests between various primitive types.


Member Function Documentation

template<typename _tType , typename _tVecType , typename _tPlaneType >
static LSE_INLINE LSBOOL LSE_CALL lsp::CIntersect::LineSegPlane ( const _tVecType &  _vStart,
const _tVecType &  _vEnd,
const _tPlaneType &  _pPlane,
_tType &  _fT,
_tVecType &  _vRet 
) [inline, static]

If the given line segment intersects the given plane, true is returned and the point where the line segment intersects the plane is returned.

Parameters:
_vStartThe starting point of the line segment to test for intersection against the given plane.
_vEndThe end point of the line segment to test for intersection against the given plane.
_pPlaneThe plane against which to test for intersection.
_fTThe returned intersection T value, if any.
_vRetThe returned intersection point, if any.
Returns:
Returns true if the line segment intersects the plane.
template<typename _tType , typename _tVecType , typename _tPlaneType >
static LSE_INLINE LSVOID LSE_CALL lsp::CIntersect::LineSegPlaneFast ( const _tVecType &  _vStart,
const _tVecType &  _vEnd,
const _tPlaneType &  _pPlane,
_tVecType &  _vRet 
) [inline, static]

Assumes the line segment is known to intersect the given plane and returns the point of intersection.

Parameters:
_vStartThe starting point of the line segment to test for intersection against the given plane.
_vEndThe end point of the line segment to test for intersection against the given plane.
_pPlaneThe plane against which to test for intersection.
_vRetThe returned intersection point.
template<typename _tType , typename _tPlaneType , typename _tVecType >
static LSE_INLINE LSBOOL LSE_CALL lsp::CIntersect::ThreePlanes ( const _tPlaneType &  _pP0,
const _tPlaneType &  _pP1,
const _tPlaneType &  _pP2,
_tVecType &  _vRet 
) [inline, static]

Gets the intersection point of 3 planes if there is one. If not, false is returned.

Parameters:
_pP0Plane 1.
_pP1Plane 2.
_pP2Plane 3.
_vRetThe returned intersection point, valid only if true is returned.
Returns:
Returns true if the 3 planes intersect at a single point.
template<typename _tType , typename _tPlaneType , typename _tRayType >
static LSE_INLINE LSBOOL LSE_CALL lsp::CIntersect::TwoPlanes ( const _tPlaneType &  _pP0,
const _tPlaneType &  _pP1,
_tRayType &  _rRay 
) [inline, static]

If the given planes intersect, the ray defining the intersection is returned. Planes must be normalized.

Parameters:
_pP0Plane 1.
_pP1Plane 2.
_rRayThe return ray.
Returns:
Returns true if the 2 planes intersect.

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