#include <Opcode.h>
Protected Attributes | |
hrp::CollisionPairInserterBase * | collisionPairInserter |
Matrix3x3 | mAR |
Absolute rotation matrix. More... | |
Point | mCenterCoeff0 |
Point | mCenterCoeff1 |
Point | mExtentsCoeff0 |
Point | mExtentsCoeff1 |
bool | mFullBoxBoxTest |
Perform full BV-BV tests (true) or SAT-lite tests (false) More... | |
bool | mFullPrimBoxTest |
Perform full Primitive-BV tests (true) or SAT-lite tests (false) More... | |
udword | mId0 |
udword | mId1 |
const MeshInterface * | mIMesh0 |
User-defined mesh interface for object0. More... | |
const MeshInterface * | mIMesh1 |
User-defined mesh interface for object1. More... | |
udword | mLeafIndex |
Triangle index. More... | |
Point | mLeafVerts [3] |
Triangle vertices. More... | |
udword | mNbBVBVTests |
Number of BV-BV tests. More... | |
udword | mNbBVPrimTests |
Number of BV-Primitive tests. More... | |
udword | mNbPrimPrimTests |
Number of Primitive-Primitive tests. More... | |
const AABBCollisionNode * | mNowNode0 |
const AABBCollisionNode * | mNowNode1 |
Container | mPairs |
Pairs of colliding primitives. More... | |
Matrix3x3 | mR0to1 |
Rotation from object0 to object1. More... | |
Matrix3x3 | mR1to0 |
Rotation from object1 to object0. More... | |
Point | mT0to1 |
Translation from object0 to object1. More... | |
Point | mT1to0 |
Translation from object1 to object0. More... | |
Protected Attributes inherited from Opcode::Collider | |
const BaseModel * | mCurrentModel |
Current model for collision query (owner of touched faces) More... | |
udword | mFlags |
Bit flags. More... | |
const MeshInterface * | mIMesh |
User-defined mesh interface. More... | |
AABBTreeCollider::AABBTreeCollider | ( | ) |
Constructor.
Definition at line 49 of file OPC_TreeCollider.cpp.
|
virtual |
Destructor.
Definition at line 67 of file OPC_TreeCollider.cpp.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
protected |
|
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.
Stats: gets the number of BV-BV overlap tests after a collision query.
Stats: gets the number of BV-Triangle overlap tests after a collision query.
Gets the number of contacts after a collision query.
Stats: gets the number of Triangle-Triangle overlap tests after a collision query.
Gets the pairs of colliding triangles after a collision query.
|
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.
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 |
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 |
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 |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |