The local AABB of the mesh.
The body to which the shape is added to.
The local bounding sphere radius of this shape.
1
-1
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
true
References to vertex pairs, making up all unique edges in the trimesh.
Identifier of the Shape.
Array of integers, indicating which vertices each triangle consists of. The length of this array is thus 3 times the number of triangles.
Optional material of the shape that regulates contact properties.
The normals data.
Local scaling of the mesh. Use .setScale() to set it.
The indexed triangles. Use .updateTree() to update it.
The type of this shape. Must be set to an int > 0 by subclasses.
vertices
Static
idStatic
typesAll the Shape types.
Readonly
BOX: 4BOX
Readonly
COMPOUND: 8COMPOUND
Readonly
CONVEXPOLYHEDRON: 16CONVEXPOLYHEDRON
Readonly
CYLINDER: 128CYLINDER
Readonly
HEIGHTFIELD: 32HEIGHTFIELD
Readonly
PARTICLE: 64PARTICLE
Readonly
PLANE: 2PLANE
Readonly
SPHERE: 1SPHERE
Readonly
TRIMESH: 256TRIMESH
calculateWorldAABB
Compute the local AABB for the trimesh
Get a vector along an edge.
Get an edge vertex
0 or 1, depending on which one of the vertices you need.
Where to store the result
Get triangles in a local AABB from the trimesh.
An array of integers, referencing the queried triangles.
Get a vertex from the trimesh,transformed by the given position and quaternion.
The "out" vector object
setScale
Static
computeStatic
create
Trimesh.
Example