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

lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type > Class Template Reference

A template allowing to create polygons with a variable number of edges. More...

#include <LSPPolygon3Base.h>

List of all members.

Public Member Functions

_tSeg3Type *LSE_CALL operator[] (LSUINT32 _ui32Index)
const _tSeg3Type *LSE_CALL operator[] (LSUINT32 _ui32Index) const
CPolygon3Base< _tType,
_tSeg3Type, _tPlane3Type >
&LSE_CALL 
operator= (const CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type > &_pSrc)
LSVOID LSE_CALL Reset ()
LSBOOL LSE_CALL Copy (const CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type > &_p3bSrc, CStackAllocator *_psaAllocator)
LSBOOL LSE_CALL SetTotalSides (LSUINT32 _ui32Total, CStackAllocator *_psaAllocator)
LSUINT32 LSE_CALL TotalSegments () const
_tSeg3Type *LSE_CALL Segments ()
const _tSeg3Type *LSE_CALL Segments () const
const _tPlane3Type &LSE_CALL Plane () const
_tPlane3Type &LSE_CALL Plane ()
LSVOID LSE_CALL SetUser (LSUINTPTR _uiptrValue)
LSUINTPTR LSE_CALL GetUser () const
LSBOOL LSE_CALL Finalize (_tType _tEpsilon)
LSVOID LSE_CALL Remove (LSUINT32 _ui32Index)
LSBOOL LSE_CALL IsSplitter () const
LSVOID LSE_CALL SetAsSplitter (LSBOOL _bVal)

Protected Attributes

_tSeg3Type * m_ptSegs
CStackAllocator * m_psaAllocator
LSUINTPTR m_uiptrUser
LSUINT32 m_ui32Total
_tPlane3Type m_pPlane
LSBOOL m_bSplitter

Detailed Description

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
class lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >

A template allowing to create polygons with a variable number of edges.

Class CPolygon3Base Description: A template allowing to create polygons with a variable number of edges.


Member Function Documentation

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSBOOL LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Copy ( const CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type > &  _p3bSrc,
CStackAllocator *  _psaAllocator 
) [inline]

Copies the source polygon into this one.

Parameters:
_p3bSrcThe polygon to copy into this one.
_psaAllocatorThe stack allocator to be used for the line segments used by this polygon.
Returns:
Returns true if the segments could be allocated from the given source polygon.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSBOOL LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Finalize ( _tType  _tEpsilon) [inline]

Finalizes the polygon such that the end of each segment connects to the start of another segment. If false is returned, at least one segment was unable to be connected.

Parameters:
_tEpsilonThe epsilon for snapping points together.
Returns:
Returns true if all end points of the polygon's edges connect with 1 starting point.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSUINTPTR LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::GetUser ( ) const [inline]

Gets the user value.

Returns:
Returns the user value.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSBOOL LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::IsSplitter ( ) const [inline]

Determines whether this ploygon is a splitter or not.

Returns:
Returns true if this polygon was used as a splitting plane in BSP compilation.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
CPolygon3Base<_tType, _tSeg3Type, _tPlane3Type>& LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::operator= ( const CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type > &  _pSrc) [inline]

Copy operator.

Parameters:
_pSrcThe source polygon to copy.
Returns:
Returns a reference to the copied polygon.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
const _tSeg3Type* LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::operator[] ( LSUINT32  _ui32Index) const [inline]

Array access.

Parameters:
_ui32IndexThe index of the point to be returned.
Returns:
Returns the segment at the given index.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
_tSeg3Type* LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::operator[] ( LSUINT32  _ui32Index) [inline]

Array access.

Parameters:
_ui32IndexThe index of the point to be returned.
Returns:
Returns the segment at the given index.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
const _tPlane3Type& LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Plane ( ) const [inline]

Gets the plane for read-only.

Returns:
Returns the plane for read-only.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
_tPlane3Type& LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Plane ( ) [inline]

Gets the plane for read and write.

Returns:
Returns the plane for read and write.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSVOID LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Remove ( LSUINT32  _ui32Index) [inline]

Removes a line segment at the given index.

Parameters:
_ui32IndexIndex of the line segment to remove.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSVOID LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Reset ( ) [inline]

Resets the polygon.

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
const _tSeg3Type* LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Segments ( ) const [inline]

Gets a pointer to the array of segments on this polygon.

Returns:
Returns a pointer to the array of segments on this polygon, which may be NULL.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
_tSeg3Type* LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::Segments ( ) [inline]

Gets a pointer to the array of segments on this polygon.

Returns:
Returns a pointer to the array of segments on this polygon, which may be NULL.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSVOID LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::SetAsSplitter ( LSBOOL  _bVal) [inline]

Sets this polygon as a splitter or not.

Parameters:
_bValIf true, the polygon is marked as a splitter, otherwise it is not.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSBOOL LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::SetTotalSides ( LSUINT32  _ui32Total,
CStackAllocator *  _psaAllocator 
) [inline]

Sets the number of segments in the polygon. This can't be changed after being set once.

Parameters:
_ui32TotalThe number of segments in the polygon.
_psaAllocatorThe stack allocator to be used for the line segments used by this polygon.
Returns:
Returns true if it was able to allocate the given number of segments from the stack allocator.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSVOID LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::SetUser ( LSUINTPTR  _uiptrValue) [inline]

Sets the user value for the polygon.

Parameters:
_uiptrValueThe value to set.
template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSUINT32 LSE_CALL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::TotalSegments ( ) const [inline]

Gets the total segments on this polygon.

Returns:
Returns the total segments on this polygon.

Member Data Documentation

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSBOOL lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_bSplitter [protected]

Is this a splitter?

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
_tPlane3Type lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_pPlane [protected]

The plane for this polygon.

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
CStackAllocator* lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_psaAllocator [protected]

The stack allocator used by this object.

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
_tSeg3Type* lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_ptSegs [protected]

Pointer to the array of line segments.

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSUINT32 lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_ui32Total [protected]

Total line segments.

template<typename _tType, typename _tSeg3Type, typename _tPlane3Type>
LSUINTPTR lsp::CPolygon3Base< _tType, _tSeg3Type, _tPlane3Type >::m_uiptrUser [protected]

Special meaning.


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