An edge shape.
Creates a new edge shape.
Given a transform, compute the associated axis aligned bounding box for this shape.
Calculated AABB, this argument is out
.
Transform to calculate the AABB.
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid.
Calculate the mass, this argument is out
.
Compute the volume and centroid of this shape intersected with a half plane
The surface normal.
The surface offset along the normal.
The shape transform.
The centroid, this argument is out
.
number
Clone the shape.
Determines if the first corner of this edge bends towards the solid side.
boolean
True if convex, otherwise false.
Determines if the second corner of this edge bends towards the solid side.
boolean
True if convex, otherwise false.
Get a core vertex 1 in local coordinates. These vertices represent a smaller edge that is used for time of impact.
core vertex 1 in local coordinates.
Get a core vertex 2 in local coordinates. These vertices represent a smaller edge that is used for time of impact.
core vertex 2 in local coordinates.
Returns a unit vector halfway between direction and previous direction.
Halfway unit vector between direction and previous direction.
Returns a unit vector halfway between direction and previous direction.
Halfway unit vector between direction and previous direction.
Get a parallel unit vector, pointing from vertex 1 to vertex 2.
Vertex 1 to vertex 2 directional vector.
Get the first vertex and apply the supplied transform.
Transform to apply.
First vertex with xf transform applied.
Get the distance from vertex1 to vertex2.
number
Distance from vertex1 to vertex2.
Get the next edge in the chain.
Next edge shape or null if there is no next edge shape.
Get a perpendicular unit vector, pointing from the solid side to the empty side.
Normal vector.
Get the previous edge in the chain.
Previous edge shape or null if there is no previous edge shape.
Get the type of this shape. You can use this to down cast to the concrete shape.
number
Get the local position of vertex1 in the parent body.
Local position of vertex1 in the parent body.
Get the local position of vertex2 in the parent body.
Local position of vertex2 in the parent body.
Cast a ray against this shape.
Ray cast results, this argument is out
.
Ray cast input parameters.
The transform to be applied to the shape.
boolean
True if the ray hits the shape, otherwise false.
Set the shape values from another shape.
The other shape to copy values from.
Get the support point in the given world direction with the supplied transform.
Transform to apply.
X world direction.
Y world direction.
Support point.
Test a point for containment in this shape. This only works for convex shapes.
Shape world transform.
Point to test against, in world coordinates.
boolean
True if the point is in this shape, otherwise false.