TriMesh¶
-
class
gimpact.
TriMesh
¶ Bases:
object
Represents a triangle mesh
Parameters: - vertices (Array[float]) – array of 3D vertices
- indices (Array[int]) – array of indices
-
aabb_set
¶ Gets an AABBSet containing the AABBs of the triangles in trimesh
Returns: AABBSet of Trimesh Return type: AABBSet
-
clone
()¶ clones the trimesh.
Returns: trimesh clone Return type: Trimesh
-
decimate
()¶ Simplifies mesh to a given target number of faces. Returns the same mesh if its face count is less than or equal to target_count.
Parameters: target_count (int) – target number of faces Returns: simplified trimesh Return type: Trimesh
-
transform
()¶ Transform triangle mesh in-place with given matrix.
Parameters: matrix (Array[float]) – 4 x 4 transformation matrix
-
triangle
()¶ returns vertices of the triangle with specified index
Parameters: idx (int) – triangle index Returns: vertices of triangle with specified index Return type: Tuple[Tuple[float, float, float]]
-
triangle_count
¶ Returns the number of triangles in the TriMesh.
Returns: the number of triangles in the TriMesh Return type: int