ModelData:getTriangles

Edit

Returns the data for all triangles in the model. There are a few differences between this and the mesh-specific functions like ModelData:getMeshVertex and ModelData:getMeshIndex:

vertices, indices = ModelData:getTriangles()

Arguments

None

Returns

NameTypeDescription
verticestable The triangle vertex positions, returned as a flat (non-nested) table of numbers. The position of each vertex is given as an x, y, and z coordinate.
indicestable The vertex indices. Every 3 indices describes a triangle.

Notes

After this function is called on a ModelData once, the result is cached.

See also