Blender V2.61 - r43446
|
#include "btBox2dBox2dCollisionAlgorithm.h"
#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
#include "BulletCollision/CollisionShapes/btBoxShape.h"
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
#include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
#include "BulletCollision/CollisionShapes/btBox2dShape.h"
Go to the source code of this file.
Classes | |
struct | ClipVertex |
Defines | |
#define | USE_PERSISTENT_CONTACTS 1 |
#define | b2Dot(a, b) (a).dot(b) |
#define | b2Mul(a, b) (a)*(b) |
#define | b2MulT(a, b) (a).transpose()*(b) |
#define | b2Cross(a, b) (a).cross(b) |
#define | btCrossS(a, s) btVector3(s * a.getY(), -s * a.getX(),0.f) |
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 |
#define b2Cross | ( | a, | |
b | |||
) | (a).cross(b) |
Definition at line 95 of file btBox2dBox2dCollisionAlgorithm.cpp.
#define b2Dot | ( | a, | |
b | |||
) | (a).dot(b) |
Definition at line 92 of file btBox2dBox2dCollisionAlgorithm.cpp.
Referenced by b2CollidePolygons(), ClipSegmentToLine(), EdgeSeparation(), FindIncidentEdge(), and FindMaxSeparation().
#define b2Mul | ( | a, | |
b | |||
) | (a)*(b) |
Definition at line 93 of file btBox2dBox2dCollisionAlgorithm.cpp.
Referenced by b2CollidePolygons(), EdgeSeparation(), FindIncidentEdge(), and FindMaxSeparation().
#define b2MulT | ( | a, | |
b | |||
) | (a).transpose()*(b) |
Definition at line 94 of file btBox2dBox2dCollisionAlgorithm.cpp.
Referenced by EdgeSeparation(), FindIncidentEdge(), and FindMaxSeparation().
#define btCrossS | ( | a, | |
s | |||
) | btVector3(s * a.getY(), -s * a.getX(),0.f) |
Definition at line 96 of file btBox2dBox2dCollisionAlgorithm.cpp.
Referenced by b2CollidePolygons().
#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 26 of file btBox2dBox2dCollisionAlgorithm.cpp.
void b2CollidePolygons | ( | btManifoldResult * | manifold, |
const btBox2dShape * | polyA, | ||
const btTransform & | xfA, | ||
const btBox2dShape * | polyB, | ||
const btTransform & | xfB | ||
) |
Definition at line 319 of file btBox2dBox2dCollisionAlgorithm.cpp.
References btManifoldResult::addContactPoint(), b2_maxManifoldPoints, b2Dot, b2Mul, btCrossS, ClipSegmentToLine(), FindIncidentEdge(), FindMaxSeparation(), btTransform::getBasis(), btBox2dShape::getVertexCount(), btBox2dShape::getVertices(), i, and ClipVertex::v.
Referenced by btBox2dBox2dCollisionAlgorithm::processCollision().
static int ClipSegmentToLine | ( | ClipVertex | vOut[2], |
ClipVertex | vIn[2], | ||
const btVector3 & | normal, | ||
btScalar | offset | ||
) | [static] |
Definition at line 100 of file btBox2dBox2dCollisionAlgorithm.cpp.
References b2Dot, ClipVertex::id, interp(), and ClipVertex::v.
Referenced by b2CollidePolygons().
static btScalar EdgeSeparation | ( | const btBox2dShape * | poly1, |
const btTransform & | xf1, | ||
int | edge1, | ||
const btBox2dShape * | poly2, | ||
const btTransform & | xf2 | ||
) | [static] |
Definition at line 135 of file btBox2dBox2dCollisionAlgorithm.cpp.
References b2Dot, b2Mul, b2MulT, BT_LARGE_FLOAT, btAssert, dot(), btTransform::getBasis(), btBox2dShape::getNormals(), btBox2dShape::getVertexCount(), btBox2dShape::getVertices(), and i.
Referenced by FindMaxSeparation().
static void FindIncidentEdge | ( | ClipVertex | c[2], |
const btBox2dShape * | poly1, | ||
const btTransform & | xf1, | ||
int | edge1, | ||
const btBox2dShape * | poly2, | ||
const btTransform & | xf2 | ||
) | [static] |
Definition at line 269 of file btBox2dBox2dCollisionAlgorithm.cpp.
References b2Dot, b2Mul, b2MulT, BT_LARGE_FLOAT, btAssert, dot(), btTransform::getBasis(), btBox2dShape::getNormals(), btBox2dShape::getVertexCount(), btBox2dShape::getVertices(), i, and ClipVertex::v.
Referenced by b2CollidePolygons().
static btScalar FindMaxSeparation | ( | int * | edgeIndex, |
const btBox2dShape * | poly1, | ||
const btTransform & | xf1, | ||
const btBox2dShape * | poly2, | ||
const btTransform & | xf2 | ||
) | [static] |
Definition at line 171 of file btBox2dBox2dCollisionAlgorithm.cpp.
References b2Dot, b2Mul, b2MulT, BT_LARGE_FLOAT, simple_enum_gen::d, dot(), EdgeSeparation(), btTransform::getBasis(), btBox2dShape::getCentroid(), btBox2dShape::getNormals(), btBox2dShape::getVertexCount(), and i.
Referenced by b2CollidePolygons().
int b2_maxManifoldPoints = 2 |
Definition at line 98 of file btBox2dBox2dCollisionAlgorithm.cpp.
Referenced by b2CollidePolygons().