![]() |
Plasma Engine
2.0
|
Computes convex hulls for 3D meshes. More...
#include <ConvexHull.h>
Classes | |
struct | Face |
Public Member Functions | |
void | SetSimplificationMinTriangleAngle (plAngle angle) |
Used to remove degenerate and unnecessary triangles that have corners with very little angle change. Ie. specifying 10 degree, means that all triangle corners must have at least a 10 degree change (and inner angle of 170 degree). Default is 22 degree. | |
void | SetSimplificationFlatVertexNormalThreshold (plAngle angle) |
Used to remove vertices that do not contribute much to the silhouette. Vertices whose adjacent triangle normals do not differ by more than angle, will be discarded. Default is 5 degree. | |
void | SetSimplificationMinTriangleEdgeLength (double fLen) |
The minimum triangle edge length. Every edge shorter than this will be discarded and replaced by a single vertex at the average position. | |
plResult | Build (const plArrayPtr< const plVec3 > vertices) |
Generates the convex hull. Simplifies the mesh according to the previously specified parameters. | |
void | Retrieve (plDynamicArray< plVec3 > &out_vertices, plDynamicArray< Face > &out_faces) |
When Build() was successful this can be called to retrieve the resulting vertices and triangles. | |
void | RetrieveVertices (plDynamicArray< plVec3 > &out_vertices) |
Same as Retrieve() but only returns the vertices. | |
Computes convex hulls for 3D meshes.
By default it will also simplify the result to a reasonable degree, to reduce complexity and vertex/triangle count.
Currently there is an upper limit of 16384 vertices to accept meshes. Everything larger than that will not be processed.
|
inline |
The minimum triangle edge length. Every edge shorter than this will be discarded and replaced by a single vertex at the average position.