@speckle/viewer
Version:
A 3d viewer for Speckle, based on threejs.
12 lines (11 loc) • 725 B
TypeScript
export default class MeshTriangulationHelper {
/**
* Calculates the triangulation of the face at given faceIndex.
* @remarks This implementation is based the ear clipping method proposed by "Christer Ericson (2005) <i>Real-Time Collision Detection</i>.
* @param {Number} faceIndex The index of the face's cardinality indicator `n`
* @param {Number[]} faces The list of faces in the mesh
* @param {Number[]} vertices The list of vertices in the mesh
* @return {Number} flat list of triangle faces (without cardinality indicators)
*/
static triangulateFace(faceIndex: number, faces: number[], vertices: number[], _inout_targetArray: any, _in_offset: any): number;
}