#include <OPC_TreeCollider.h>
Contains an AABB tree collider. This class performs a collision test between two AABB trees.
Definition at line 70 of file OPC_TreeCollider.h.
virtual AABBTreeCollider::~AABBTreeCollider | ( | ) | [virtual] |
void AABBTreeCollider::_Collide | ( | const AABBCollisionNode * | b0, |
const AABBCollisionNode * | b1 | ||
) | [protected] |
void AABBTreeCollider::_Collide | ( | const AABBQuantizedNode * | b0, |
const AABBQuantizedNode * | b1, | ||
const Point & | a, | ||
const Point & | Pa, | ||
const Point & | b, | ||
const Point & | Pb | ||
) | [protected] |
void AABBTreeCollider::_Collide | ( | const AABBNoLeafNode * | a, |
const AABBNoLeafNode * | b | ||
) | [protected] |
void AABBTreeCollider::_Collide | ( | const AABBQuantizedNoLeafNode * | a, |
const AABBQuantizedNoLeafNode * | b | ||
) | [protected] |
void AABBTreeCollider::_CollideBoxTri | ( | const AABBNoLeafNode * | b | ) | [protected] |
void AABBTreeCollider::_CollideBoxTri | ( | const AABBQuantizedNoLeafNode * | b | ) | [protected] |
void AABBTreeCollider::_CollideTriBox | ( | const AABBNoLeafNode * | b | ) | [protected] |
void AABBTreeCollider::_CollideTriBox | ( | const AABBQuantizedNoLeafNode * | b | ) | [protected] |
inline_ BOOL AABBTreeCollider::BoxBoxOverlap | ( | const Point & | ea, |
const Point & | ca, | ||
const Point & | eb, | ||
const Point & | cb | ||
) | [protected] |
OBB-OBB overlap test using the separating axis theorem.
ea | [in] extents from box A |
ca | [in] center from box A |
eb | [in] extents from box B |
cb | [in] center from box B |
Definition at line 19 of file OPC_BoxBoxOverlap.h.
bool AABBTreeCollider::CheckTemporalCoherence | ( | Pair * | cache | ) | [protected] |
bool AABBTreeCollider::Collide | ( | BVTCache & | cache, |
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null |
||
) |
Generic collision query for generic OPCODE models. After the call, access the results with:
cache | [in] collision cache for model pointers and a colliding pair of primitives |
world0 | [in] world matrix for first object, or null |
world1 | [in] world matrix for second object, or null |
bool AABBTreeCollider::Collide | ( | const AABBCollisionTree * | tree0, |
const AABBCollisionTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
bool AABBTreeCollider::Collide | ( | const AABBNoLeafTree * | tree0, |
const AABBNoLeafTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
bool AABBTreeCollider::Collide | ( | const AABBQuantizedTree * | tree0, |
const AABBQuantizedTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
bool AABBTreeCollider::Collide | ( | const AABBQuantizedNoLeafTree * | tree0, |
const AABBQuantizedNoLeafTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
inline_ udword AABBTreeCollider::GetNbBVBVTests | ( | ) | const [inline] |
Stats: gets the number of BV-BV overlap tests after a collision query.
Definition at line 135 of file OPC_TreeCollider.h.
inline_ udword AABBTreeCollider::GetNbBVPrimTests | ( | ) | const [inline] |
Stats: gets the number of BV-Triangle overlap tests after a collision query.
Definition at line 155 of file OPC_TreeCollider.h.
inline_ udword AABBTreeCollider::GetNbPairs | ( | ) | const [inline] |
Gets the number of contacts after a collision query.
Definition at line 167 of file OPC_TreeCollider.h.
inline_ udword AABBTreeCollider::GetNbPrimPrimTests | ( | ) | const [inline] |
Stats: gets the number of Triangle-Triangle overlap tests after a collision query.
Definition at line 145 of file OPC_TreeCollider.h.
inline_ const Pair* AABBTreeCollider::GetPairs | ( | ) | const [inline] |
Gets the pairs of colliding triangles after a collision query.
Definition at line 177 of file OPC_TreeCollider.h.
HRP_COLLISION_EXPORT void AABBTreeCollider::InitQuery | ( | const Matrix4x4 * | world0 = null , |
const Matrix4x4 * | world1 = null |
||
) | [protected] |
AABBTreeCollider::override | ( | Collider | ) | const |
Validates current settings. You should call this method after all the settings and callbacks have been defined for a collider.
void AABBTreeCollider::PrimTest | ( | udword | id0, |
udword | id1 | ||
) | [protected] |
inline_ void AABBTreeCollider::PrimTestIndexTri | ( | udword | id0 | ) | [protected] |
inline_ void AABBTreeCollider::PrimTestTriIndex | ( | udword | id1 | ) | [protected] |
void AABBTreeCollider::setCollisionPairInserter | ( | hrp::CollisionPairInserterBase * | collisionPairInserter | ) | [inline] |
Definition at line 77 of file OPC_TreeCollider.h.
inline_ void AABBTreeCollider::SetFullBoxBoxTest | ( | bool | flag | ) | [inline] |
Settings: selects between full box-box tests or "SAT-lite" tests (where Class III axes are discarded)
flag | [in] true for full tests, false for coarse tests |
Definition at line 114 of file OPC_TreeCollider.h.
inline_ void AABBTreeCollider::SetFullPrimBoxTest | ( | bool | flag | ) | [inline] |
Settings: selects between full triangle-box tests or "SAT-lite" tests (where Class III axes are discarded)
flag | [in] true for full tests, false for coarse tests |
Definition at line 123 of file OPC_TreeCollider.h.
inline_ BOOL AABBTreeCollider::Setup | ( | const MeshInterface * | mi0, |
const MeshInterface * | mi1 | ||
) | [inline, protected] |
Definition at line 247 of file OPC_TreeCollider.h.
inline_ BOOL AABBTreeCollider::TriBoxOverlap | ( | const Point & | center, |
const Point & | extents | ||
) | [protected] |
Triangle-Box overlap test using the separating axis theorem. This is the code from Tomas Möller, a bit optimized:
center | [in] box center |
extents | [in] box extents |
Definition at line 118 of file OPC_TriBoxOverlap.h.
BOOL AABBTreeCollider::TriTriOverlap | ( | const Point & | V0, |
const Point & | V1, | ||
const Point & | V2, | ||
const Point & | U0, | ||
const Point & | U1, | ||
const Point & | U2 | ||
) | [protected] |
Triangle/triangle intersection test routine, by Tomas Moller, 1997. See article "A Fast Triangle-Triangle Intersection Test", Journal of Graphics Tools, 2(2), 1997
Updated June 1999: removed the divisions -- a little faster now! Updated October 1999: added {} to CROSS and SUB macros
int NoDivTriTriIsect(float V0[3],float V1[3],float V2[3], float U0[3],float U1[3],float U2[3])
V0 | [in] triangle 0, vertex 0 |
V1 | [in] triangle 0, vertex 1 |
V2 | [in] triangle 0, vertex 2 |
U0 | [in] triangle 1, vertex 0 |
U1 | [in] triangle 1, vertex 1 |
U2 | [in] triangle 1, vertex 2 |
Definition at line 179 of file OPC_TriTriOverlap.h.
Definition at line 220 of file OPC_TreeCollider.h.
Matrix3x3 AABBTreeCollider::mAR [protected] |
Absolute rotation matrix.
Definition at line 198 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mCenterCoeff0 [protected] |
Definition at line 204 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mCenterCoeff1 [protected] |
Definition at line 206 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mExtentsCoeff0 [protected] |
Definition at line 205 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mExtentsCoeff1 [protected] |
Definition at line 207 of file OPC_TreeCollider.h.
bool AABBTreeCollider::mFullBoxBoxTest [protected] |
Perform full BV-BV tests (true) or SAT-lite tests (false)
Definition at line 218 of file OPC_TreeCollider.h.
bool AABBTreeCollider::mFullPrimBoxTest [protected] |
Perform full Primitive-BV tests (true) or SAT-lite tests (false)
Definition at line 219 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mId0 [protected] |
Definition at line 210 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mId1 [protected] |
Definition at line 211 of file OPC_TreeCollider.h.
const MeshInterface* AABBTreeCollider::mIMesh0 [protected] |
User-defined mesh interface for object0.
Definition at line 191 of file OPC_TreeCollider.h.
const MeshInterface* AABBTreeCollider::mIMesh1 [protected] |
User-defined mesh interface for object1.
Definition at line 192 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mLeafIndex [protected] |
Triangle index.
Definition at line 216 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mLeafVerts[3] [protected] |
Triangle vertices.
Definition at line 215 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mNbBVBVTests [protected] |
Number of BV-BV tests.
Definition at line 194 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mNbBVPrimTests [protected] |
Number of BV-Primitive tests.
Definition at line 196 of file OPC_TreeCollider.h.
udword AABBTreeCollider::mNbPrimPrimTests [protected] |
Number of Primitive-Primitive tests.
Definition at line 195 of file OPC_TreeCollider.h.
const AABBCollisionNode* AABBTreeCollider::mNowNode0 [protected] |
Definition at line 212 of file OPC_TreeCollider.h.
const AABBCollisionNode* AABBTreeCollider::mNowNode1 [protected] |
Definition at line 213 of file OPC_TreeCollider.h.
Container AABBTreeCollider::mPairs [protected] |
Pairs of colliding primitives.
Definition at line 189 of file OPC_TreeCollider.h.
Matrix3x3 AABBTreeCollider::mR0to1 [protected] |
Rotation from object0 to object1.
Definition at line 199 of file OPC_TreeCollider.h.
Matrix3x3 AABBTreeCollider::mR1to0 [protected] |
Rotation from object1 to object0.
Definition at line 200 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mT0to1 [protected] |
Translation from object0 to object1.
Definition at line 201 of file OPC_TreeCollider.h.
Point AABBTreeCollider::mT1to0 [protected] |
Translation from object1 to object0.
Definition at line 202 of file OPC_TreeCollider.h.