b2Collision.h File Reference

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


Classes

union  b2ContactID
 Contact ids to facilitate warm starting. More...
struct  b2ContactID::Features
 The features that intersect to form the contact point. More...
struct  b2ManifoldPoint
 A manifold point is a contact point belonging to a contact manifold. More...
struct  b2Manifold
 A manifold for two touching convex shapes. More...
struct  b2Segment
 A line segment. More...
struct  b2AABB
 An axis aligned bounding box. More...
struct  b2OBB
 An oriented bounding box. More...

Functions

void b2CollideCircles (b2Manifold *manifold, const b2CircleShape *circle1, const b2XForm &xf1, const b2CircleShape *circle2, const b2XForm &xf2)
 Compute the collision manifold between two circles.
void b2CollidePolygonAndCircle (b2Manifold *manifold, const b2PolygonShape *polygon, const b2XForm &xf1, const b2CircleShape *circle, const b2XForm &xf2)
 Compute the collision manifold between a polygon and a circle.
void b2CollidePolygons (b2Manifold *manifold, const b2PolygonShape *polygon1, const b2XForm &xf1, const b2PolygonShape *polygon2, const b2XForm &xf2)
 Compute the collision manifold between two circles.
float32 b2Distance (b2Vec2 *x1, b2Vec2 *x2, const b2Shape *shape1, const b2XForm &xf1, const b2Shape *shape2, const b2XForm &xf2)
 Compute the distance between two shapes and the closest points.
float32 b2TimeOfImpact (const b2Shape *shape1, const b2Sweep &sweep1, const b2Shape *shape2, const b2Sweep &sweep2)
 Compute the time when two shapes begin to touch or touch at a closer distance.


Detailed Description

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


Function Documentation

float32 b2Distance ( b2Vec2 x1,
b2Vec2 x2,
const b2Shape shape1,
const b2XForm xf1,
const b2Shape shape2,
const b2XForm xf2 
)

Compute the distance between two shapes and the closest points.

Returns:
the distance between the shapes or zero if they are overlapped/touching.

float32 b2TimeOfImpact ( const b2Shape shape1,
const b2Sweep sweep1,
const b2Shape shape2,
const b2Sweep sweep2 
)

Compute the time when two shapes begin to touch or touch at a closer distance.

Warning:
the sweeps must have the same time interval.
Returns:
the fraction between [0,1] in which the shapes first touch. fraction=0 means the shapes begin touching/overlapped, and fraction=1 means the shapes don't touch.


Generated on Fri Mar 7 23:58:18 2008 for Box2D by  doxygen 1.5.4