Model:getTriangles
Returns 2 tables containing mesh data for the Model.
The first table is a list of vertex positions and contains 3 numbers for the x, y, and z coordinate of each vertex. The second table is a list of triangles and contains 1-based indices into the first table representing the first, second, and third vertices that make up each triangle.
The vertex positions will be affected by node transforms.
vertices, indices = Model:getTriangles()
Arguments
None
Returns
Name | Type | Description |
vertices | table | A flat table of numbers containing vertex positions. |
indices | table | A flat table of numbers containing triangle vertex indices. |
See also
Model:getAABB
World:newMeshCollider
lovr.audio.setGeometry
Model