#include <Opcode.h>
Constructor.
Definition at line 49 of file OPC_TreeCollider.cpp.
AABBTreeCollider::~AABBTreeCollider | ( | ) | [virtual] |
Destructor.
Definition at line 67 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_Collide | ( | const AABBCollisionNode * | b0, |
const AABBCollisionNode * | b1 | ||
) | [protected] |
Recursive collision query for normal AABB trees.
b0 | [in] collision node from first tree |
b1 | [in] collision node from second tree |
Definition at line 518 of file OPC_TreeCollider.cpp.
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] |
Recursive collision query for no-leaf AABB trees.
a | [in] collision node from first tree |
b | [in] collision node from second tree |
Definition at line 709 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_Collide | ( | const AABBQuantizedNoLeafNode * | a, |
const AABBQuantizedNoLeafNode * | b | ||
) | [protected] |
Recursive collision query for quantized no-leaf AABB trees.
a | [in] collision node from first tree |
b | [in] collision node from second tree |
Definition at line 914 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_CollideBoxTri | ( | const AABBNoLeafNode * | b | ) | [protected] |
Recursive collision of a leaf node from B and a branch from A.
b | [in] collision node from first tree |
Definition at line 674 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_CollideBoxTri | ( | const AABBQuantizedNoLeafNode * | b | ) | [protected] |
Recursive collision of a leaf node from B and a quantized branch from A.
b | [in] collision node from first tree |
leaf | [in] leaf triangle from second tree |
Definition at line 885 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_CollideTriBox | ( | const AABBNoLeafNode * | b | ) | [protected] |
Recursive collision of a leaf node from A and a branch from B.
b | [in] collision node from second tree |
Definition at line 650 of file OPC_TreeCollider.cpp.
void AABBTreeCollider::_CollideTriBox | ( | const AABBQuantizedNoLeafNode * | b | ) | [protected] |
Recursive collision of a leaf node from A and a quantized branch from B.
leaf | [in] leaf triangle from first tree |
b | [in] collision node from second tree |
Definition at line 856 of file OPC_TreeCollider.cpp.
inline_ BOOL Opcode::AABBTreeCollider::BoxBoxOverlap | ( | const Point & | ea, |
const Point & | ca, | ||
const Point & | eb, | ||
const Point & | cb | ||
) | [protected] |
bool AABBTreeCollider::CheckTemporalCoherence | ( | Pair * | cache | ) | [protected] |
Takes advantage of temporal coherence.
cache | [in] cache for a pair of previously colliding primitives |
Definition at line 316 of file OPC_TreeCollider.cpp.
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 |
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 |
world1 | [in] world matrix for second object |
Definition at line 97 of file OPC_TreeCollider.cpp.
bool AABBTreeCollider::Collide | ( | const AABBCollisionTree * | tree0, |
const AABBCollisionTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
Collision query for normal AABB trees.
tree0 | [in] AABB tree from first object |
tree1 | [in] AABB tree from second object |
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
cache | [in/out] cache for a pair of previously colliding primitives |
Definition at line 349 of file OPC_TreeCollider.cpp.
bool AABBTreeCollider::Collide | ( | const AABBNoLeafTree * | tree0, |
const AABBNoLeafTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
Collision query for no-leaf AABB trees.
tree0 | [in] AABB tree from first object |
tree1 | [in] AABB tree from second object |
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
cache | [in/out] cache for a pair of previously colliding primitives |
Definition at line 377 of file OPC_TreeCollider.cpp.
bool AABBTreeCollider::Collide | ( | const AABBQuantizedTree * | tree0, |
const AABBQuantizedTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
Collision query for quantized AABB trees.
tree0 | [in] AABB tree from first object |
tree1 | [in] AABB tree from second object |
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
cache | [in/out] cache for a pair of previously colliding primitives |
Definition at line 405 of file OPC_TreeCollider.cpp.
bool AABBTreeCollider::Collide | ( | const AABBQuantizedNoLeafTree * | tree0, |
const AABBQuantizedNoLeafTree * | tree1, | ||
const Matrix4x4 * | world0 = null , |
||
const Matrix4x4 * | world1 = null , |
||
Pair * | cache = null |
||
) |
Collision query for quantized no-leaf AABB trees.
tree0 | [in] AABB tree from first object |
tree1 | [in] AABB tree from second object |
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
cache | [in/out] cache for a pair of previously colliding primitives |
Definition at line 448 of file OPC_TreeCollider.cpp.
inline_ udword Opcode::AABBTreeCollider::GetNbBVBVTests | ( | ) | const [inline] |
Stats: gets the number of BV-BV overlap tests after a collision query.
inline_ udword Opcode::AABBTreeCollider::GetNbBVPrimTests | ( | ) | const [inline] |
Stats: gets the number of BV-Triangle overlap tests after a collision query.
inline_ udword Opcode::AABBTreeCollider::GetNbPairs | ( | ) | const [inline] |
Gets the number of contacts after a collision query.
inline_ udword Opcode::AABBTreeCollider::GetNbPrimPrimTests | ( | ) | const [inline] |
Stats: gets the number of Triangle-Triangle overlap tests after a collision query.
inline_ const Pair* Opcode::AABBTreeCollider::GetPairs | ( | ) | const [inline] |
Gets the pairs of colliding triangles after a collision query.
void AABBTreeCollider::InitQuery | ( | const Matrix4x4 * | world0 = null , |
const Matrix4x4 * | world1 = null |
||
) | [protected] |
Initializes a collision query :
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
Definition at line 241 of file OPC_TreeCollider.cpp.
Opcode::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] |
Leaf-leaf test for two primitive indices.
id0 | [in] index from first leaf-triangle |
id1 | [in] index from second leaf-triangle |
Definition at line 571 of file OPC_TreeCollider.cpp.
inline_ void AABBTreeCollider::PrimTestIndexTri | ( | udword | id0 | ) | [protected] |
inline_ void AABBTreeCollider::PrimTestTriIndex | ( | udword | id1 | ) | [protected] |
void Opcode::AABBTreeCollider::setCollisionPairInserter | ( | hrp::CollisionPairInserterBase * | collisionPairInserter | ) | [inline] |
inline_ void Opcode::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 |
inline_ void Opcode::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 |
inline_ BOOL Opcode::AABBTreeCollider::Setup | ( | const MeshInterface * | mi0, |
const MeshInterface * | mi1 | ||
) | [inline, protected] |
inline_ BOOL Opcode::AABBTreeCollider::TriBoxOverlap | ( | const Point & | center, |
const Point & | extents | ||
) | [protected] |
BOOL Opcode::AABBTreeCollider::TriTriOverlap | ( | const Point & | V0, |
const Point & | V1, | ||
const Point & | V2, | ||
const Point & | U0, | ||
const Point & | U1, | ||
const Point & | U2 | ||
) | [protected] |
Matrix3x3 Opcode::AABBTreeCollider::mAR [protected] |
Point Opcode::AABBTreeCollider::mCenterCoeff0 [protected] |
Point Opcode::AABBTreeCollider::mCenterCoeff1 [protected] |
Point Opcode::AABBTreeCollider::mExtentsCoeff0 [protected] |
Point Opcode::AABBTreeCollider::mExtentsCoeff1 [protected] |
bool Opcode::AABBTreeCollider::mFullBoxBoxTest [protected] |
bool Opcode::AABBTreeCollider::mFullPrimBoxTest [protected] |
udword Opcode::AABBTreeCollider::mId0 [protected] |
udword Opcode::AABBTreeCollider::mId1 [protected] |
const MeshInterface* Opcode::AABBTreeCollider::mIMesh0 [protected] |
const MeshInterface* Opcode::AABBTreeCollider::mIMesh1 [protected] |
udword Opcode::AABBTreeCollider::mLeafIndex [protected] |
Point Opcode::AABBTreeCollider::mLeafVerts[3] [protected] |
udword Opcode::AABBTreeCollider::mNbBVBVTests [protected] |
udword Opcode::AABBTreeCollider::mNbBVPrimTests [protected] |
udword Opcode::AABBTreeCollider::mNbPrimPrimTests [protected] |
const AABBCollisionNode* Opcode::AABBTreeCollider::mNowNode0 [protected] |
const AABBCollisionNode* Opcode::AABBTreeCollider::mNowNode1 [protected] |
Container Opcode::AABBTreeCollider::mPairs [protected] |
Matrix3x3 Opcode::AABBTreeCollider::mR0to1 [protected] |
Matrix3x3 Opcode::AABBTreeCollider::mR1to0 [protected] |
Point Opcode::AABBTreeCollider::mT0to1 [protected] |
Point Opcode::AABBTreeCollider::mT1to0 [protected] |