CrystalSpace

Public API Reference

CS::TriangleIndicesStream< T > Class Template Reference

Helper class to extract triangles from an index buffer. More...

#include <csgfx/trianglestream.h>

List of all members.

Public Member Functions

void BeginTriangulate (const uint8 *index, const uint8 *indexEnd, size_t stride, csRenderBufferComponentType compType, csRenderMeshType meshtype)
 Begin triangulation of an index buffer.
bool HasNextTri () const
 Returns whether a triangle is available.
bool NextTriangle (T &a, T &b, T &c)
 Fetches the next triangle from the buffer.
 TriangleIndicesStream ()


Detailed Description

template<typename T>
class CS::TriangleIndicesStream< T >

Helper class to extract triangles from an index buffer.

Automatically handles tristrips, quads etc. as well.

Definition at line 37 of file trianglestream.h.


Member Function Documentation

template<typename T>
void CS::TriangleIndicesStream< T >::BeginTriangulate ( const uint8 index,
const uint8 indexEnd,
size_t  stride,
csRenderBufferComponentType  compType,
csRenderMeshType  meshtype 
) [inline]

Begin triangulation of an index buffer.

Parameters:
index Pointer to start of the indices.
indexEnd Pointer to end of the indices.
stride Distance between index elements in bytes.
meshtype Mesh type of the index data.

Definition at line 122 of file trianglestream.h.

References CS_MESHTYPE_TRIANGLEFAN, and CS_MESHTYPE_TRIANGLESTRIP.

template<typename T>
bool CS::TriangleIndicesStream< T >::HasNextTri (  )  const [inline]

Returns whether a triangle is available.

Definition at line 149 of file trianglestream.h.

template<typename T>
bool CS::TriangleIndicesStream< T >::NextTriangle ( T &  a,
T &  b,
T &  c 
) [inline]

Fetches the next triangle from the buffer.

Definition at line 154 of file trianglestream.h.

References CS_MESHTYPE_QUADS, CS_MESHTYPE_TRIANGLEFAN, CS_MESHTYPE_TRIANGLES, CS_MESHTYPE_TRIANGLESTRIP, and csRenderBufferComponentSizes.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7