Creates a single one-sided triangle strip.
More...
#include <LSGTriangleStripper.h>
List of all members.
Public Member Functions |
LSBOOL LSE_CALL | InitTriangleStripper (LSUINT32 _ui32Faces=0UL, const LSUINT32 *_pui32Faces=NULL, const LSUINT16 *_pui16Faces=NULL) |
LSBOOL LSE_CALL | Compute () |
LSE_INLINE LSUINT32 LSE_CALL | TotalIndices () const |
LSE_INLINE const LSUINT16 *LSE_CALL | IndicesAsWords () const |
LSE_INLINE const LSUINT32 *LSE_CALL | IndicesAsDoubleWords () const |
Protected Member Functions |
LSUINT32 LSE_CALL | GetStripLength (LSUINT32 _ui32Face, LSUINT32 _ui32Oldest, LSUINT32 _ui32Middle, LSUINT32 *_pui32Strip, LSUINT32 *_pui32Faces, LSUINT8 *_pui8Tags) |
LSUINT32 LSE_CALL | GetBestStrip (LSUINT32 _ui32Face, LSUINT32 *_pui32TempFaceBuffer, LSUINT32 *_pui32BestFaceBuffer, LSUINT32 *_pui32TempStripBuffer, LSUINT32 *_pui32BestStripBuffer, LSUINT8 *_pui8TempTagsBuffer, LSUINT8 *_pui8Tags, LSUINT32 &_ui32StripLen) |
LSBOOL LSE_CALL | ConnectStrip (CVectorPoD< LSUINT32, LSUINT32, 1024UL > &_vLeft, LSUINT32 *_pui32Right, LSUINT32 _ui32RightLen) |
Protected Attributes |
CStripAdjacency | m_saAdj |
CVectorPoD< LSUINT8, LSUINT32 > | m_vVerts |
LSBOOL | m_bWords |
Detailed Description
Creates a single one-sided triangle strip.
Class CTriangleStripper Description: Creates a single one-sided triangle strip. Code based on Pierre Terdiman's original work.
Member Function Documentation
LSBOOL LSE_CALL lsg::CTriangleStripper::Compute |
( |
| ) |
|
Create the triangle strip. After a successful call to this function, the created triangle strip can be read directly.
- Returns:
- Returns true if there were no memory failures during the operation.
LSBOOL LSE_CALL lsg::CTriangleStripper::ConnectStrip |
( |
CVectorPoD< LSUINT32, LSUINT32, 1024UL > & |
_vLeft, |
|
|
LSUINT32 * |
_pui32Right, |
|
|
LSUINT32 |
_ui32RightLen |
|
) |
| [protected] |
Connect one strip to another.
- Parameters:
-
_vLeft | The first strip to connect to the second. |
_pui32Right | Second strip to connect. |
_ui32RightLen | Length of the second strip to connect. |
- Returns:
- Returns false if there was not enough memory to perform the operation.
LSUINT32 LSE_CALL lsg::CTriangleStripper::GetBestStrip |
( |
LSUINT32 |
_ui32Face, |
|
|
LSUINT32 * |
_pui32TempFaceBuffer, |
|
|
LSUINT32 * |
_pui32BestFaceBuffer, |
|
|
LSUINT32 * |
_pui32TempStripBuffer, |
|
|
LSUINT32 * |
_pui32BestStripBuffer, |
|
|
LSUINT8 * |
_pui8TempTagsBuffer, |
|
|
LSUINT8 * |
_pui8Tags, |
|
|
LSUINT32 & |
_ui32StripLen |
|
) |
| [protected] |
Determine the best strip starting at the given face.
- Parameters:
-
_ui32Face | The face where to start searching. |
_pui32TempFaceBuffer | Buffer to hold faces for checking strip lengths. |
_pui32BestFaceBuffer | Best face buffer found. Output. |
_pui32TempStripBuffer | Buffer to hold strips for checking strip lengths. |
_pui32BestStripBuffer | Best strip buffer found. Output. |
_pui8TempTagsBuffer | Buffer to hold tags for checking strip lengths. |
_pui8Tags | The master copy of the tags buffer. Updated with the longest strip's details. |
_ui32StripLen | The length of the longest strip. Output. |
- Returns:
- Returns the number of faces in the strip.
LSUINT32 LSE_CALL lsg::CTriangleStripper::GetStripLength |
( |
LSUINT32 |
_ui32Face, |
|
|
LSUINT32 |
_ui32Oldest, |
|
|
LSUINT32 |
_ui32Middle, |
|
|
LSUINT32 * |
_pui32Strip, |
|
|
LSUINT32 * |
_pui32Faces, |
|
|
LSUINT8 * |
_pui8Tags |
|
) |
| [protected] |
Get the length of a triangle if extended from the given face in the given direction.
- Parameters:
-
_ui32Face | Index of the face where to start checking. |
_ui32Oldest | First index of the strip. |
_ui32Middle | Second index of the strip. |
_pui32Strip | Buffer in which to store the strip. |
_pui32Faces | Buffer in which to store the faces. |
_pui8Tags | Buffer to use to keep track of tagged faces. |
- Returns:
- Returns the length of the strip.
LSE_INLINE const LSUINT32 *LSE_CALL lsg::CTriangleStripper::IndicesAsDoubleWords |
( |
| ) |
const |
Get the indices as a double-word size.
- Returns:
- Returns the indices as a double-word size.
LSE_INLINE const LSUINT16 *LSE_CALL lsg::CTriangleStripper::IndicesAsWords |
( |
| ) |
const |
Get the indices as a word size.
- Returns:
- Returns the indices as a word size.
LSBOOL LSE_CALL lsg::CTriangleStripper::InitTriangleStripper |
( |
LSUINT32 |
_ui32Faces = 0UL , |
|
|
const LSUINT32 * |
_pui32Faces = NULL , |
|
|
const LSUINT16 * |
_pui16Faces = NULL |
|
) |
| |
Initialize the triangle stripper.
- Parameters:
-
_ui32Faces | Number of triangles. |
_pui32Faces | Pointer to the triangles with 32-bit indices or NULL. |
_pui16Faces | Pointer to the triangles with 16-bit indices or NULL. |
- Returns:
- Returns false if there are not enough resources to complete the setup.
LSE_INLINE LSUINT32 LSE_CALL lsg::CTriangleStripper::TotalIndices |
( |
| ) |
const |
Get the total indices.
- Returns:
- Returns the total indices.
Member Data Documentation
The adjacency information.
The documentation for this class was generated from the following file: