"L. Spiro Engine"
|
Creates adjacency information for the preparation of the conversion from a triangle list to a triangle strip. More...
#include <LSGStripAdjacency.h>
Classes | |
struct | LSG_ADJ_EDGE |
struct | LSG_ADJ_TRI |
Public Types | |
typedef struct lsg::CStripAdjacency::LSG_ADJ_TRI * | LPLSG_ADJ_TRI |
typedef struct lsg::CStripAdjacency::LSG_ADJ_TRI | LPCLSG_ADJ_TRI |
typedef struct lsg::CStripAdjacency::LSG_ADJ_EDGE * | LPLSG_ADJ_EDGE |
typedef struct lsg::CStripAdjacency::LSG_ADJ_EDGE | LPCLSG_ADJ_EDGE |
Public Member Functions | |
LSBOOL LSE_CALL | InitStripAdjacency (LSUINT32 _ui32Faces=0UL, const LSUINT32 *_pui32Faces=NULL, const LSUINT16 *_pui16Faces=NULL) |
LSBOOL LSE_CALL | CreateDatabase () |
LSVOID LSE_CALL | Reset () |
LSE_INLINE LSUINT32 LSE_CALL | TotalFaces () const |
LSE_INLINE LSUINT32 LSE_CALL | TotalEdges () const |
LSE_INLINE const LSG_ADJ_TRI *LSE_CALL | Faces () const |
LSE_INLINE const LSG_ADJ_EDGE *LSE_CALL | Edges () const |
Static Public Member Functions | |
static LSE_INLINE LSUINT32 LSE_CALL | FindEdge (const LSG_ADJ_TRI &_atAdjInfo, LSUINT32 _ui32Ref0, LSUINT32 _ui32Ref1) |
static LSE_INLINE LSUINT32 LSE_CALL | OppositeVertex (const LSG_ADJ_TRI &_atAdjInfo, LSUINT32 _ui32Ref0, LSUINT32 _ui32Ref1) |
Protected Member Functions | |
LSVOID LSE_CALL | AddTriangle (LSUINT32 _ui32Vert0, LSUINT32 _ui32Vert1, LSUINT32 _ui32Vert2) |
LSVOID LSE_CALL | AddEdge (LSUINT32 _ui32Edge0, LSUINT32 _ui32Edge1, LSUINT32 _ui32Face) |
LSBOOL LSE_CALL | UpdateLink (LSUINT32 _ui32Tri0, LSUINT32 _ui32Tri1, LSUINT32 _ui32Ref0, LSUINT32 _ui32Ref1) |
Protected Attributes | |
LSG_ADJ_TRI * | m_patFaces |
LSG_ADJ_EDGE * | m_paeEdges |
LSUINT32 | m_ui32Faces |
LSUINT32 | m_ui32Edges |
Creates adjacency information for the preparation of the conversion from a triangle list to a triangle strip.
Class CStripAdjacency Description: Creates adjacency information for the preparation of the conversion from a triangle list to a triangle strip. Code based on Pierre Terdiman's original work.
typedef struct lsg::CStripAdjacency::LSG_ADJ_EDGE * lsg::CStripAdjacency::LPLSG_ADJ_EDGE |
An adjacent edge.
typedef struct lsg::CStripAdjacency::LSG_ADJ_TRI * lsg::CStripAdjacency::LPLSG_ADJ_TRI |
Adjacency information. Indices of triangles adjacent to each other.
LSVOID LSE_CALL lsg::CStripAdjacency::AddEdge | ( | LSUINT32 | _ui32Edge0, |
LSUINT32 | _ui32Edge1, | ||
LSUINT32 | _ui32Face | ||
) | [protected] |
Add an edge to the database.
_ui32Edge0 | Edge index 0. |
_ui32Edge1 | Edge index 1. |
_ui32Face | Face index. |
LSVOID LSE_CALL lsg::CStripAdjacency::AddTriangle | ( | LSUINT32 | _ui32Vert0, |
LSUINT32 | _ui32Vert1, | ||
LSUINT32 | _ui32Vert2 | ||
) | [protected] |
Add a triangle to the database.
_ui32Vert0 | Vertex 0. |
_ui32Vert1 | Vertex 1. |
_ui32Vert2 | Vertex 2. |
LSBOOL LSE_CALL lsg::CStripAdjacency::CreateDatabase | ( | ) |
Create the adjency data.
LSE_INLINE const CStripAdjacency::LSG_ADJ_EDGE *LSE_CALL lsg::CStripAdjacency::Edges | ( | ) | const |
Get the pointer to the start of the edge array.
LSE_INLINE const CStripAdjacency::LSG_ADJ_TRI *LSE_CALL lsg::CStripAdjacency::Faces | ( | ) | const |
Get the pointer to the start of the face array.
LSE_INLINE LSUINT32 LSE_CALL lsg::CStripAdjacency::FindEdge | ( | const LSG_ADJ_TRI & | _atAdjInfo, |
LSUINT32 | _ui32Ref0, | ||
LSUINT32 | _ui32Ref1 | ||
) | [static] |
Find an edge on a triangle given two vertex references.
_atAdjInfo | Adjacency information. |
_ui32Ref0 | First reference. |
_ui32Ref1 | Second reference. |
LSBOOL LSE_CALL lsg::CStripAdjacency::InitStripAdjacency | ( | LSUINT32 | _ui32Faces = 0UL , |
const LSUINT32 * | _pui32Faces = NULL , |
||
const LSUINT16 * | _pui16Faces = NULL |
||
) |
Initialize adjacency information. _pui32Faces and _pui16Faces cannot both be valid. One or the other must be NULL, but not both.
_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. |
LSE_INLINE LSUINT32 LSE_CALL lsg::CStripAdjacency::OppositeVertex | ( | const LSG_ADJ_TRI & | _atAdjInfo, |
LSUINT32 | _ui32Ref0, | ||
LSUINT32 | _ui32Ref1 | ||
) | [static] |
Gets the last vertex reference given the first two.
_atAdjInfo | Adjacency information. |
_ui32Ref0 | First reference. |
_ui32Ref1 | Second reference. |
LSVOID LSE_CALL lsg::CStripAdjacency::Reset | ( | ) |
Reset the object back to default.
LSE_INLINE LSUINT32 LSE_CALL lsg::CStripAdjacency::TotalEdges | ( | ) | const |
Get the number of edges.
LSE_INLINE LSUINT32 LSE_CALL lsg::CStripAdjacency::TotalFaces | ( | ) | const |
Get the number of faces.
LSBOOL LSE_CALL lsg::CStripAdjacency::UpdateLink | ( | LSUINT32 | _ui32Tri0, |
LSUINT32 | _ui32Tri1, | ||
LSUINT32 | _ui32Ref0, | ||
LSUINT32 | _ui32Ref1 | ||
) | [protected] |
Update links between two triangles that share the same edge.
_ui32Tri0 | First triangle sharing the edge. |
_ui32Tri1 | Second triangle sharing the edge. |
_ui32Ref0 | Common edge index 0. |
_ui32Ref1 | Common edge index 1. |
LSG_ADJ_EDGE* lsg::CStripAdjacency::m_paeEdges [protected] |
Array of edges.
LSG_ADJ_TRI* lsg::CStripAdjacency::m_patFaces [protected] |
Array of triangles.
LSUINT32 lsg::CStripAdjacency::m_ui32Edges [protected] |
Total edges.
LSUINT32 lsg::CStripAdjacency::m_ui32Faces [protected] |
Total faces.