#include <sglTriStripper.hpp>
Public Methods | |
sglTriStripper () | |
virtual | ~sglTriStripper () |
unsigned int | getNumTriangles () const |
void | addTriangleFace (sglTriStruct< T > *tri) |
void | addPolyFace (const vector< T > &vertList) |
void | computeSmoothNormals (const sglVec3f *verts, unsigned int(*addNormal)(void *,sglVec3f &), void *passThrough) |
void | computeFacetedNormals (const sglVec3f *verts, unsigned int(*addNormal)(void *,sglVec3f &), void *passThrough) |
void | triStripify (bool verbose=true) |
void | reset () |
void | copyTriangleIndexLists (unsigned int *index_vlist, unsigned int *index_nlist, unsigned int *index_tlist, unsigned int *index_clist) |
unsigned int | getNumStrips () const |
vector<T>* | getStrip (unsigned int index) |
void | copyStrip (unsigned int index, unsigned int *index_vlist, unsigned int *index_nlist, unsigned int *index_tlist, unsigned int *index_clist) |
Static Public Methods | |
void | computeFaceNormal (const sglVec3f &v0, const sglVec3f &v1, const sglVec3f &v2, sglVec3f &normal) |
To make for efficient processing all faces with the same material type are grouped together. This class contains the repository for a single material definition and all associated face data (vertex, normal and texcoord indices). It also contains the function used to convert the triangle face data into more efficient triangle strips.
Definition at line 49 of file sglTriStripper.hpp.
|
constructor initializes object as a black (empty) material.
Definition at line 198 of file sglTriStripper.hpp. |
|
Destructor.
Definition at line 209 of file sglTriStripper.hpp. |
|
return number of triangles loaded.
Definition at line 58 of file sglTriStripper.hpp. |
|
sglObjModel passes absolute index list for current triangle (n-gons and relative indices are converted to triangles and absolute indices by the parser in sglObjModel Definition at line 299 of file sglTriStripper.hpp. |
|
Computes the normal for the given triangle face.
Definition at line 362 of file sglTriStripper.hpp. |
|
Computes smooth (not faceted) normals for vertices with invalid normal indices (UINT_MAX). As each normal is calculated the given addNormal function is called to compute its index.
|
|
Computes faceted normals for vertices with invalid normal indices (UINT_MAX). As each normal is calculated the given addNormal function is called to compute its index.
|
|
create tri-strips from the original triangle data.
Definition at line 474 of file sglTriStripper.hpp. |
|
reset the tri-stripper to the initial state. (allows the stripper to be used more than once).
Definition at line 216 of file sglTriStripper.hpp. |
|
copy the index lists for the isolated triangles.
Definition at line 925 of file sglTriStripper.hpp. |
|
get number of tstrips.
Definition at line 105 of file sglTriStripper.hpp. |
|
get a handle to each strip based on index.
Definition at line 914 of file sglTriStripper.hpp. |