ArcGIS Procedural Runtime  3.3.11173
Functions
prtx::MeshUtils Namespace Reference

Description

Utility functions for prtx::Mesh.

Functions

MeshPtr createTriangulatedMesh (const MeshPtr &mesh, IndexVector *triangle2FaceMap=0)
 
void transformCoords (DoubleVector &coords, const DoubleVector &matrix)
 
void transformNormals (DoubleVector &normals, const DoubleVector &matrix)
 

Function Documentation

◆ createTriangulatedMesh()

MeshPtr prtx::MeshUtils::createTriangulatedMesh ( const MeshPtr mesh,
IndexVector triangle2FaceMap = 0 
)

Creates a triangulated version of the passed Mesh.

Parameters
meshThe mesh to trriangulate.
triangle2FaceMapOptional pointer to index vector to return the mapping of the new triangles (faces) to the old faces.

◆ transformCoords()

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]coordsVertices to transform. Size must be multiple of 3 (3 * number of vertices).
matrixMatrix to transform vertices with. 4x4 harmonic transformation matrix, column major (OpenGL).

◆ transformNormals()

void prtx::MeshUtils::transformNormals ( DoubleVector normals,
const DoubleVector matrix 
)

Transforms a number of normals (i.e. (x, y, z) coordinate triples) with a transformation matrix. The normals are transformed with the inverse transpose of the matrix and then normalized. #param[in, out] normals Normals to transform. Size must be multiple of 3 (3 * number of normals). Normals must be normalized. #param matrix Matrix to transform the normals with. 4x4 harmonic transformation matrix, column major (OpenGL). Must be invertible.