Convex Class
Convex shape class.
Constructor
Convex
(
-
vertices
Parameters:
-
vertices
ArrayAn array of Float32Array vertices that span this shape. Vertices are given in counter-clockwise (CCW) direction.
Item Index
Properties
Methods
conputeMomentOfInertia
(
Number
-
mass
Compute the mass moment of inertia of the Convex.
Parameters:
-
mass
Number
Returns:
Number:
updateArea
()
Update the .area
updateBoundingRadius
()
Updates the .boundingRadius property
updateCenterOfMass
()
Update the .centerOfMass property.
updateTriangles
()
Update the .triangles property
Properties
boundingRadius
Number
The bounding radius of the convex
centerOfMass
Float32Array
The center of mass of the Convex
triangles
Array
Triangulated version of this convex. The structure is Array of 3-Arrays, and each subarray contains 3 integers, referencing the vertices.
vertices
Array
Vertices defined in the local frame.