Blender V5.0
btBox2dBox2dCollisionAlgorithm.cpp File Reference

Go to the source code of this file.

Classes

struct  ClipVertex

Macros

#define USE_PERSISTENT_CONTACTS   1
#define b2Dot(a, b)
#define b2Mul(a, b)
#define b2MulT(a, b)
#define b2Cross(a, b)
#define btCrossS(a, s)

Functions

void b2CollidePolygons (btManifoldResult *manifold, const btBox2dShape *polyA, const btTransform &xfA, const btBox2dShape *polyB, const btTransform &xfB)
static int ClipSegmentToLine (ClipVertex vOut[2], ClipVertex vIn[2], const btVector3 &normal, btScalar offset)
static btScalar EdgeSeparation (const btBox2dShape *poly1, const btTransform &xf1, int edge1, const btBox2dShape *poly2, const btTransform &xf2)
static btScalar FindMaxSeparation (int *edgeIndex, const btBox2dShape *poly1, const btTransform &xf1, const btBox2dShape *poly2, const btTransform &xf2)
static void FindIncidentEdge (ClipVertex c[2], const btBox2dShape *poly1, const btTransform &xf1, int edge1, const btBox2dShape *poly2, const btTransform &xf2)

Variables

int b2_maxManifoldPoints = 2

Macro Definition Documentation

◆ b2Cross

#define b2Cross ( a,
b )
Value:
(a).cross(b)
VecBase< float, 3 > cross(VecOp< float, 3 >, VecOp< float, 3 >) RET

Definition at line 89 of file btBox2dBox2dCollisionAlgorithm.cpp.

◆ b2Dot

#define b2Dot ( a,
b )
Value:
(a).dot(b)
dot(value.rgb, luminance_coefficients)") DEFINE_VALUE("REDUCE(lhs

Definition at line 86 of file btBox2dBox2dCollisionAlgorithm.cpp.

Referenced by b2CollidePolygons(), ClipSegmentToLine(), EdgeSeparation(), and FindIncidentEdge().

◆ b2Mul

#define b2Mul ( a,
b )

◆ b2MulT

#define b2MulT ( a,
b )
Value:
(a).transpose() * (b)
MatBase< R, C > transpose(MatBase< C, R >) RET

Definition at line 88 of file btBox2dBox2dCollisionAlgorithm.cpp.

Referenced by EdgeSeparation(), FindIncidentEdge(), and FindMaxSeparation().

◆ btCrossS

#define btCrossS ( a,
s )
Value:
btVector3(s* a.getY(), -s* a.getX(), 0.f)
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Definition btVector3.h:82

Definition at line 90 of file btBox2dBox2dCollisionAlgorithm.cpp.

Referenced by b2CollidePolygons().

◆ USE_PERSISTENT_CONTACTS

#define USE_PERSISTENT_CONTACTS   1

btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library. The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross

Definition at line 27 of file btBox2dBox2dCollisionAlgorithm.cpp.

Function Documentation

◆ b2CollidePolygons()

◆ ClipSegmentToLine()

int ClipSegmentToLine ( ClipVertex vOut[2],
ClipVertex vIn[2],
const btVector3 & normal,
btScalar offset )
static

Definition at line 94 of file btBox2dBox2dCollisionAlgorithm.cpp.

References b2Dot, btVector3, ClipVertex::id, interp(), ClipVertex::v, and v.

Referenced by b2CollidePolygons().

◆ EdgeSeparation()

btScalar EdgeSeparation ( const btBox2dShape * poly1,
const btTransform & xf1,
int edge1,
const btBox2dShape * poly2,
const btTransform & xf2 )
static

◆ FindIncidentEdge()

void FindIncidentEdge ( ClipVertex c[2],
const btBox2dShape * poly1,
const btTransform & xf1,
int edge1,
const btBox2dShape * poly2,
const btTransform & xf2 )
static

◆ FindMaxSeparation()

btScalar FindMaxSeparation ( int * edgeIndex,
const btBox2dShape * poly1,
const btTransform & xf1,
const btBox2dShape * poly2,
const btTransform & xf2 )
static

Variable Documentation

◆ b2_maxManifoldPoints

int b2_maxManifoldPoints = 2

Definition at line 92 of file btBox2dBox2dCollisionAlgorithm.cpp.

Referenced by b2CollidePolygons().