Skip to main content

Module collision

Module collision 

Source

Structs§

Capsule
A solid capsule can be viewed as two semicircles connected by a rectangle. (b2Capsule)
CastOutput
Low level ray cast or shape cast output data. The hit point is in the local or relative frame of the input. Returns a zero fraction and normal in the case of initial overlap. (b2CastOutput)
ChainSegment
A line segment with one-sided collision. Only collides on the right side. Several of these are generated for a chain shape. ghost1 -> point1 -> point2 -> ghost2. (b2ChainSegment)
Circle
A solid circle. (b2Circle)
LocalManifold
Contact manifold in local coordinates (frame A). (b2LocalManifold)
LocalManifoldPoint
Contact manifold point in local coordinates (frame A). (b2LocalManifoldPoint)
Manifold
A contact manifold describes the contact points between colliding shapes. (b2Manifold)
ManifoldPoint
A manifold point is a contact point belonging to a contact manifold. It holds details related to the geometry and dynamics of the contact points. Box2D uses speculative collision so some contact points may be separated. (b2ManifoldPoint)
MassData
This holds the mass data computed for a shape. (b2MassData)
PlaneResult
These are the collision planes returned from b2World_CollideMover. The plane and point are relative to the query origin, matching the mover capsule. (b2PlaneResult)
Polygon
A solid convex polygon. It is assumed that the interior of the polygon is to the left of each edge. Polygons have a maximum number of vertices equal to MAX_POLYGON_VERTICES. In most cases you should not need many vertices for a convex polygon. (b2Polygon)
RayCastInput
Low level ray cast input data. (b2RayCastInput)
Segment
A line segment with two-sided collision. (b2Segment)
ShapeCastInput
Low level shape cast input in generic form. This allows casting an arbitrary point cloud wrapped with a radius. For example, a circle is a single point with a non-zero radius. A capsule is two points with a non-zero radius. A box is four points with a zero radius. (b2ShapeCastInput)
WorldCastOutput
Ray cast or shape cast output with the hit point lifted back to a world position. In the C single-precision build this is an alias of b2CastOutput; the double-precision build widens point to b2Pos, which is what the unconditional Pos here does in both modes. (b2WorldCastOutput)

Enums§

ShapeGeometry
The geometry payload of a shape. The C b2Shape stores a b2ShapeType tag plus a union of the concrete geometries; in Rust that pairing is an enum. The internal shape module embeds this.
ShapeType
Shape type. (types.h: b2ShapeType)

Constants§

SHAPE_TYPE_COUNT
The number of shape types. (types.h: b2_shapeTypeCount)