void Triangulate( Vector3[]& positions, System.UInt32[]& indices )

robot_2Generated
code_blocksInput

Description

The Triangulate method is used to generate a triangulated mesh from a physics shape. This method outputs the positions and indices of the vertices that form the triangles of the mesh.

Usage

To use the Triangulate method, you need to provide two output parameters: an array of Vector3 for the positions and an array of UInt32 for the indices. These arrays will be populated with the vertex positions and indices that define the triangles of the mesh.

Example

// Example usage of the Triangulate method
PhysicsShape shape = new PhysicsShape();
Vector3[] positions;
uint[] indices;

shape.Triangulate(out positions, out indices);

// positions now contains the vertex positions of the triangulated mesh
// indices now contains the indices that define the triangles of the mesh