Classes | Enumerations | Functions | Variables
b2_collision.h File Reference
#include <limits.h>
#include "b2_api.h"
#include "b2_math.h"
Include dependency graph for b2_collision.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  b2AABB
 An axis aligned bounding box. More...
 
struct  b2ClipVertex
 Used for computing contact manifolds. More...
 
struct  b2ContactFeature
 
union  b2ContactID
 Contact ids to facilitate warm starting. More...
 
struct  b2Manifold
 
struct  b2ManifoldPoint
 
struct  b2RayCastInput
 Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). More...
 
struct  b2RayCastOutput
 
struct  b2WorldManifold
 This is used to compute the current state of a contact manifold. More...
 

Enumerations

enum  b2PointState { b2_nullState, b2_addState, b2_persistState, b2_removeState }
 This is used for determining the state of contact points. More...
 

Functions

B2_API int32 b2ClipSegmentToLine (b2ClipVertex vOut[2], const b2ClipVertex vIn[2], const b2Vec2 &normal, float offset, int32 vertexIndexA)
 Clipping for contact manifolds. More...
 
B2_API void b2CollideCircles (b2Manifold *manifold, const b2CircleShape *circleA, const b2Transform &xfA, const b2CircleShape *circleB, const b2Transform &xfB)
 Compute the collision manifold between two circles. More...
 
B2_API void b2CollideEdgeAndCircle (b2Manifold *manifold, const b2EdgeShape *polygonA, const b2Transform &xfA, const b2CircleShape *circleB, const b2Transform &xfB)
 Compute the collision manifold between an edge and a circle. More...
 
B2_API void b2CollideEdgeAndPolygon (b2Manifold *manifold, const b2EdgeShape *edgeA, const b2Transform &xfA, const b2PolygonShape *circleB, const b2Transform &xfB)
 Compute the collision manifold between an edge and a polygon. More...
 
B2_API void b2CollidePolygonAndCircle (b2Manifold *manifold, const b2PolygonShape *polygonA, const b2Transform &xfA, const b2CircleShape *circleB, const b2Transform &xfB)
 Compute the collision manifold between a polygon and a circle. More...
 
B2_API void b2CollidePolygons (b2Manifold *manifold, const b2PolygonShape *polygonA, const b2Transform &xfA, const b2PolygonShape *polygonB, const b2Transform &xfB)
 Compute the collision manifold between two polygons. More...
 
B2_API void b2GetPointStates (b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints], const b2Manifold *manifold1, const b2Manifold *manifold2)
 
B2_API bool b2TestOverlap (const b2Shape *shapeA, int32 indexA, const b2Shape *shapeB, int32 indexB, const b2Transform &xfA, const b2Transform &xfB)
 Determine if two generic shapes overlap. More...
 
bool b2TestOverlap (const b2AABB &a, const b2AABB &b)
 

Variables

const uint8 b2_nullFeature = UCHAR_MAX
 

Detailed Description

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

Definition in file b2_collision.h.

Enumeration Type Documentation

◆ b2PointState

This is used for determining the state of contact points.

Enumerator
b2_nullState 

point does not exist

b2_addState 

point was added in the update

b2_persistState 

point persisted across the update

b2_removeState 

point was removed in the update

Definition at line 132 of file b2_collision.h.

Function Documentation

◆ b2ClipSegmentToLine()

B2_API int32 b2ClipSegmentToLine ( b2ClipVertex  vOut[2],
const b2ClipVertex  vIn[2],
const b2Vec2 normal,
float  offset,
int32  vertexIndexA 
)

Clipping for contact manifolds.

Definition at line 205 of file b2_collision.cpp.

◆ b2CollideCircles()

B2_API void b2CollideCircles ( b2Manifold manifold,
const b2CircleShape circleA,
const b2Transform xfA,
const b2CircleShape circleB,
const b2Transform xfB 
)

Compute the collision manifold between two circles.

Definition at line 27 of file b2_collide_circle.cpp.

◆ b2CollideEdgeAndCircle()

B2_API void b2CollideEdgeAndCircle ( b2Manifold manifold,
const b2EdgeShape polygonA,
const b2Transform xfA,
const b2CircleShape circleB,
const b2Transform xfB 
)

Compute the collision manifold between an edge and a circle.

Definition at line 31 of file b2_collide_edge.cpp.

◆ b2CollideEdgeAndPolygon()

B2_API void b2CollideEdgeAndPolygon ( b2Manifold manifold,
const b2EdgeShape edgeA,
const b2Transform xfA,
const b2PolygonShape circleB,
const b2Transform xfB 
)

Compute the collision manifold between an edge and a polygon.

Definition at line 269 of file b2_collide_edge.cpp.

◆ b2CollidePolygonAndCircle()

B2_API void b2CollidePolygonAndCircle ( b2Manifold manifold,
const b2PolygonShape polygonA,
const b2Transform xfA,
const b2CircleShape circleB,
const b2Transform xfB 
)

Compute the collision manifold between a polygon and a circle.

Definition at line 55 of file b2_collide_circle.cpp.

◆ b2CollidePolygons()

B2_API void b2CollidePolygons ( b2Manifold manifold,
const b2PolygonShape polygonA,
const b2Transform xfA,
const b2PolygonShape polygonB,
const b2Transform xfB 
)

Compute the collision manifold between two polygons.

Definition at line 120 of file b2_collide_polygon.cpp.

◆ b2GetPointStates()

B2_API void b2GetPointStates ( b2PointState  state1[b2_maxManifoldPoints],
b2PointState  state2[b2_maxManifoldPoints],
const b2Manifold manifold1,
const b2Manifold manifold2 
)

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.

Definition at line 92 of file b2_collision.cpp.

◆ b2TestOverlap() [1/2]

B2_API bool b2TestOverlap ( const b2Shape shapeA,
int32  indexA,
const b2Shape shapeB,
int32  indexB,
const b2Transform xfA,
const b2Transform xfB 
)

Determine if two generic shapes overlap.

Definition at line 239 of file b2_collision.cpp.

◆ b2TestOverlap() [2/2]

bool b2TestOverlap ( const b2AABB a,
const b2AABB b 
)
inline

Definition at line 268 of file b2_collision.h.

Variable Documentation

◆ b2_nullFeature

const uint8 b2_nullFeature = UCHAR_MAX

Definition at line 40 of file b2_collision.h.



mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22