XEngine::IndexedFaceSet Class Reference
[XEngine]
#include <IndexedFaceSet.h>
Inheritance diagram for XEngine::IndexedFaceSet:
Detailed Description
- Author:
- Koray Balci
- Version:
- 1.0
- Date:
- May 2003
See base class documentation for use and more info.
- See also:
- Geometry
Public Member Functions | |
void | computeVertexNormals () |
IndexedFaceSet & | copyFrom (const IndexedFaceSet &rhs) |
overriding base class virtual method | |
size_t | getIndexCount () const |
Returns the number of indices. | |
const unsigned short * | getIndices () const |
Accessor for the indices to the triangles. | |
void | setIndices (const std::vector< std::vector< unsigned short > > &indices) |
Member Function Documentation
|
Computes the vertex normals if the mesh has an indexed structure. For computing the vertex normals, simply the face normals for each polygon is found by crossing two edges of the polygon, then corresponding vertices' normals are summed up with the face normal. At last, all the vertex normals are normalized. Might be implemented faster, but since this step is done only once in the initialization of the mesh, it is not a bottleneck. However, for dynamically changing geometry, some optimizations can be considered. |
|
Indices are set here. If a face is not a triangle it is divided into triangles so that the final geometry contains only triangles (which is a Good Thing!).
|
The documentation for this class was generated from the following files:
- IndexedFaceSet.h
- IndexedFaceSet.cpp
Generated on Mon Aug 28 15:39:25 2006 for Xface Core Library by 1.4.6-NO