"L. Spiro Engine"
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

lsp::CSolidLeafBspBase Class Reference

List of all members.

Classes

struct  LSP_NODE
struct  LSP_STACK

Public Types

typedef struct
lsp::CSolidLeafBspBase::LSP_NODE
LPLSP_NODE
typedef struct
lsp::CSolidLeafBspBase::LSP_NODE 
LPCLSP_NODE

Public Member Functions

const LSP_NODE *LSE_CALL Root () const
LSBOOL LSE_CALL CreateBsp (const _tPolyType *_ppPolies, LSUINT32 _ui32Total, CStackAllocator *_psaAllocator, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
LSBOOL LSE_CALL CreateBspConvex (const _tPolyType *_ppPolies, LSUINT32 _ui32Total, CStackAllocator *_psaAllocator, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
LSBOOL LSE_CALL GetLeafs (CVectorPoD< LSP_NODE *, LSUINT32 > &_vArray)
LSBOOL LSE_CALL GetLeafs (CVectorPoD< const LSP_NODE *, LSUINT32 > &_vArray, CVectorPoD< const LSP_NODE *, LSUINT32 > &_vStack) const
LSBOOL LSE_CALL GetLeafs (LSP_NODE *_pnNode, CVectorPoD< LSP_NODE *, LSUINT32 > &_vArray) const
LSBOOL LSE_CALL GetLeafs (const LSP_NODE *_pnNode, CVectorPoD< const LSP_NODE *, LSUINT32 > &_vArray, CVectorPoD< const LSP_NODE *, LSUINT32 > &_vStack) const

Static Public Member Functions

static LSBOOL LSE_CALL GetParents (const LSP_NODE *_pnNode, CVectorPoD< LSP_NODE *, LSUINT32 > &_vArray)

Protected Types

typedef struct
lsp::CSolidLeafBspBase::LSP_STACK
LPLSP_STACK
typedef struct
lsp::CSolidLeafBspBase::LSP_STACK 
LPCLSP_STACK

Protected Member Functions

LSBOOL LSE_CALL CreateBsp (LSP_NODE &_nNode, const CVector< _tPolyType, LSUINT32, 4096UL > &_vPolies, CStackAllocator *_psaAllocator, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
LSBOOL LSE_CALL CreateBspConvex (LSP_NODE &_nNode, const CVector< _tPolyType, LSUINT32, 4096UL > &_vPolies, CStackAllocator *_psaAllocator, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
_tPlaneType LSE_CALL BestSplittingPlane (const CVector< _tPolyType, LSUINT32, 4096UL > &_vPolies, LSUINT32 &_ui32Index, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
LSBOOL LSE_CALL AllAreConvex (const CVector< _tPolyType, LSUINT32, 4096UL > &_vPlanePolies, const CVector< _tPolyType, LSUINT32, 4096UL > &_vPolies, _tType _fThickness=static_cast< _tType >(LSM_PLANE_THICKNESS))
LSBOOL LSE_CALL AllAreSplitters (const CVector< _tPolyType, LSUINT32, 4096UL > &_vPolies)

Protected Attributes

LSP_NODE m_nRoot

Member Typedef Documentation

A node in the BSP tree.

The explicit stack used during BSP construction.


Member Function Documentation

LSBOOL LSE_CALL lsp::CSolidLeafBspBase::AllAreConvex ( const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPlanePolies,
const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPolies,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline, protected]

Determines if the polygons in the given array form a convex region of space.

Parameters:
_vPlanePoliesThe array of polygons on the splitting plane.
_vPoliesThe array of polygons to check for forming a convex region of space.
_fThicknessPlane thickness.
Returns:
Returns true if the polygons form a convex region of space.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::AllAreSplitters ( const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPolies) [inline, protected]

Determines if all given polygons are splitters.

Parameters:
_vPoliesThe polygons to check.
Returns:
Returns true if all polygons are marked as being splitters.
_tPlaneType LSE_CALL lsp::CSolidLeafBspBase::BestSplittingPlane ( const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPolies,
LSUINT32 &  _ui32Index,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline, protected]

Finds the best splitting plane for the given set of input polygons.

Parameters:
_vPoliesThe polygons for which to find the best splitting plane.
_ui32IndexOn return, holds the index of the polygon whose plane was used for the return.
_fThicknessPlane thickness.
Returns:
Returns the best plane for splitting the given set of polygons.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::CreateBsp ( const _tPolyType *  _ppPolies,
LSUINT32  _ui32Total,
CStackAllocator *  _psaAllocator,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline]

Builds the BSP given an array of polygons.

Parameters:
_ppPoliesThe array of polygons.
_ui32TotalThe total number of polygons.
_psaAllocatorThe stack allocator to be used to allocate new nodes and polygon segments.
_fThicknessPlane thickness.
Returns:
Returns true if there was enough memory to create the BSP tree.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::CreateBsp ( LSP_NODE _nNode,
const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPolies,
CStackAllocator *  _psaAllocator,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline, protected]

Builds the BSP given an array of polygons and the node in which to store the results.

Parameters:
_nNodeThe node in which to store the results of the splitting.
_vPoliesThe array of polygons.
_psaAllocatorThe stack allocator to be used to allocate new nodes and polygon segments.
_fThicknessPlane thickness.
Returns:
Returns true if there was enough memory to create the BSP tree.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::CreateBspConvex ( LSP_NODE _nNode,
const CVector< _tPolyType, LSUINT32, 4096UL > &  _vPolies,
CStackAllocator *  _psaAllocator,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline, protected]

Builds the BSP given an array of polygons and the node in which to store the results

Parameters:
_nNodeThe node in which to store the results of the splitting.
_vPoliesThe array of polygons.
_psaAllocatorThe stack allocator to be used to allocate new nodes and polygon segments.
_fThicknessPlane thickness.
Returns:
Returns true if there was enough memory to create the BSP tree.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::CreateBspConvex ( const _tPolyType *  _ppPolies,
LSUINT32  _ui32Total,
CStackAllocator *  _psaAllocator,
_tType  _fThickness = static_cast<_tType>(LSM_PLANE_THICKNESS) 
) [inline]

Builds the BSP given an array of polygons in which the leafs store convex sets of polygons rather than just polygons coplanar to the leaf plane.

Parameters:
_ppPoliesThe array of polygons.
_ui32TotalThe total number of polygons.
_psaAllocatorThe stack allocator to be used to allocate new nodes and polygon segments.
_fThicknessPlane thickness.
Returns:
Returns true if there was enough memory to create the BSP tree.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::GetLeafs ( const LSP_NODE _pnNode,
CVectorPoD< const LSP_NODE *, LSUINT32 > &  _vArray,
CVectorPoD< const LSP_NODE *, LSUINT32 > &  _vStack 
) const [inline]

Fills the given array with pointers to the leafs on this tree.

Parameters:
_pnNodeThe node.
_vArrayHolds the returned array of leafs.
_vStackExplicit stack to use.
Returns:
Returns true if there was enough memory to complete the operation.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::GetLeafs ( CVectorPoD< LSP_NODE *, LSUINT32 > &  _vArray) [inline]

Fills the given array with pointers to the leafs on this tree.

Parameters:
_vArrayHolds the returned array of leafs.
Returns:
Returns true if there was enough memory to complete the operation.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::GetLeafs ( CVectorPoD< const LSP_NODE *, LSUINT32 > &  _vArray,
CVectorPoD< const LSP_NODE *, LSUINT32 > &  _vStack 
) const [inline]

Fills the given array with pointers to the leafs on this tree.

Parameters:
_vArrayHolds the returned array of leafs.
_vStackExplicit stack to use.
Returns:
Returns true if there was enough memory to complete the operation.
LSBOOL LSE_CALL lsp::CSolidLeafBspBase::GetLeafs ( LSP_NODE _pnNode,
CVectorPoD< LSP_NODE *, LSUINT32 > &  _vArray 
) const [inline]

Fills the given array with pointers to the leafs on this tree.

Parameters:
_pnNodeThe node.
_vArrayHolds the returned array of leafs.
Returns:
Returns true if there was enough memory to complete the operation.
static LSBOOL LSE_CALL lsp::CSolidLeafBspBase::GetParents ( const LSP_NODE _pnNode,
CVectorPoD< LSP_NODE *, LSUINT32 > &  _vArray 
) [inline, static]

Fills the given array with pointers to the parents of the given node.

Parameters:
_pnNodeThe node whose parents are to be returned.
_vArrayHolds the returned array of parent nodes.
Returns:
Returns true if there was enough memory to complete the operation.
const LSP_NODE* LSE_CALL lsp::CSolidLeafBspBase::Root ( ) const [inline]

Gets a pointer to the root node to the BSP tree. Never returns NULL.

Returns:
Returns a pointer to the root node to the BSP tree. Never returns NULL.

Member Data Documentation

The root node.


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