[][src]Module box2d_rs::b2_collision

Structs

B2AABB

An axis aligned bounding box.

B2clipVertex

Used for computing contact manifolds.

B2contactFeature

The features that intersect to form the contact point This must be 4 bytes or less.

B2contactId

Contact ids to facilitate warm starting.

B2manifold

A manifold for two touching convex shapes. Box2D supports multiple types of contact:

B2manifoldPoint

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. The local point usage depends on the manifold type: -e_circles: the local center of circle_b -e_faceA: the local center of cirlceB or the clip point of polygon_b -e_faceB: the clip point of polygon_a This structure is stored across time steps, so we keep it small. Note: the impulses are used for internal caching and may not provide reliable contact forces, especially for high speed collisions.

B2rayCastInput

Ray-cast input data. The ray extends from p1 to p1 + max_fraction * (p2 - p1).

B2rayCastOutput

Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from b2RayCastInput.

B2worldManifold

This is used to compute the current state of a contact manifold.

Enums

B2contactFeatureType
B2manifoldType
B2pointState

This is used for determining the state of contact points.

Constants

B2_NULL_FEATURE

@file Structures and functions used for computing contact points, distance queries, and TOI queries.

Functions

b2_aabb_is_valid
b2_clip_segment_to_line
b2_collide_circles

Compute the collision manifold between two circles.

b2_collide_edge_and_circle

Compute the collision manifold between an edge and a circle.

b2_collide_edge_and_polygon

Compute the collision manifold between an edge and a polygon.

b2_collide_polygon_and_circle

Compute the collision manifold between a polygon and a circle.

b2_collide_polygons

Compute the collision manifold between two polygons.

b2_get_point_states

Compute the point states given two manifolds. The states pertain to the transition from manifold1 to manifold2. So state1 is either persist or remove while state2 is either add or persist.

b2_test_overlap
b2_test_overlap_shapes

Determine if two generic shapes overlap.