Utility functions for prtx::Mesh.
MeshPtr prtx::MeshUtils::createTriangulatedMesh |
( |
const MeshPtr & |
mesh, |
|
|
IndexVector * |
triangle2FaceMap = 0 |
|
) |
| |
Creates a triangulated version of the passed Mesh.
- Parameters
-
mesh | The mesh to trriangulate. |
triangle2FaceMap | Optional pointer to index vector to return the mapping of the new triangles (faces) to the old faces. |
void prtx::MeshUtils::transformCoords |
( |
DoubleVector & |
coords, |
|
|
const DoubleVector & |
matrix |
|
) |
| |
Transforms a number of vertices (i.e. (x, y, z) coordinate triples) with a transformation matrix.
- Parameters
-
[in,out] | coords | Vertices to transform. Size must be multiple of 3 (3 * number of vertices). |
| matrix | Matrix to transform vertices with. 4x4 harmonic transformation matrix, column major (OpenGL). |