ConvexShape Class
Constructor
ConvexShape
(
-
vertices
Parameters:
-
vertices
Arrayarray of vertices composing the convex hull
Item Index
Methods
Methods
calculateLocalAABB
(
-
aabb
Calculates this shape's local AABB and stores it in the passed AABB object
Parameters:
-
aabb
AABB
findSupportPoint
(
-
direction
-
support_point
Given direction
, find the point in this body which is the most extreme in that direction.
This support point is calculated in world coordinates and stored in the second parameter support_point
Parameters:
-
direction
Vec3direction to use in finding the support point
-
support_point
Vec3vec3 variable which will contain the supporting point after calling this method
Properties
_intergral
Float32Array
private
used in computing the convex hull's center of mass & volume
center_of_mass
Vec3
coordinates of the hull's COM
end {vec3{ end point of the segment
Vec3
Checks if a ray segment intersects with the shape
vertices
Arrayvertices composing the convex hull
volume
Number
the convex hull's volume