csTriangleMeshLOD Class Reference
A static class which performs the calculation of the best order to do the collapsing. More...
#include <csgeom/trimeshlod.h>
Static Public Member Functions | |
static csTriangle * | CalculateLOD (csTriangleMesh *mesh, csTriangleVerticesCost *verts, float max_cost, int &num_triangles, csTriangleLODAlgo *lodalgo) |
Calculate a simplified set of triangles so that all vertices with cost lower then the maximum cost are removed. | |
static void | CalculateLOD (csTriangleMesh *mesh, csTriangleVerticesCost *verts, int *translate, int *emerge_from, csTriangleLODAlgo *lodalgo) |
For the given mesh and a set of vertices calculate the best order in which to perform LOD reduction. | |
static csTriangle * | CalculateLODFast (csTriangleMesh *mesh, csTriangleVerticesCost *verts, float max_cost, int &num_triangles, csTriangleLODAlgo *lodalgo) |
This is a faster version of CalculateLOD() which doesn't recalculate the cost of a vertex after edge collapse. |
Detailed Description
A static class which performs the calculation of the best order to do the collapsing.
Definition at line 174 of file trimeshlod.h.
Member Function Documentation
|
Calculate a simplified set of triangles so that all vertices with cost lower then the maximum cost are removed. The resulting simplified triangle mesh is returned (and number of triangles is set to num_triangles). You must delete[] the returned list of triangles if you don't want to use it anymore.
|
|
For the given mesh and a set of vertices calculate the best order in which to perform LOD reduction. This fills two arrays (which should have the same size as the number of vertices in 'verts'). 'translate' contains a mapping from the old order of vertices to the new one. The new ordering of vertices is done in a way so that the first vertex is the one which is always present in the model and with increasing detail; vertices are added in ascending vertex order. 'emerge_from' indicates (for a given index in the new order) from which each vertex arises (or seen the other way around: to what this vertex had collapsed).
|
|
This is a faster version of CalculateLOD() which doesn't recalculate the cost of a vertex after edge collapse. It is less accurate in cases where the cost of a vertex can change after edge collapse but it calculates a LOT faster. You must delete[] the returned list of triangles if you don't want to use it anymore.
|
The documentation for this class was generated from the following file:
- csgeom/trimeshlod.h
Generated for Crystal Space by doxygen 1.4.4