#include <Opcode.h>
|
| AABBTreeCollider () |
|
bool | Collide (BVTCache &cache, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null) |
|
bool | Collide (const AABBCollisionTree *tree0, const AABBCollisionTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBNoLeafTree *tree0, const AABBNoLeafTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBQuantizedTree *tree0, const AABBQuantizedTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
bool | Collide (const AABBQuantizedNoLeafTree *tree0, const AABBQuantizedNoLeafTree *tree1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null, Pair *cache=null) |
|
inline_ udword | GetNbBVBVTests () const |
|
inline_ udword | GetNbBVPrimTests () const |
|
inline_ udword | GetNbPairs () const |
|
inline_ udword | GetNbPrimPrimTests () const |
|
inline_ const Pair * | GetPairs () const |
|
| override (Collider) HRP_COLLISION_EXPORT const char *ValidateSettings() |
|
void | setCollisionPairInserter (hrp::CollisionPairInserterBase *collisionPairInserter) |
|
inline_ void | SetFullBoxBoxTest (bool flag) |
|
inline_ void | SetFullPrimBoxTest (bool flag) |
|
virtual | ~AABBTreeCollider () |
|
| Collider () |
|
inline_ BOOL | ContactFound () const |
|
inline_ BOOL | FirstContactEnabled () const |
|
inline_ BOOL | GetContactStatus () const |
|
inline_ void | SetFirstContact (bool flag) |
|
inline_ void | SetPrimitiveTests (bool flag) |
|
inline_ void | SetTemporalCoherence (bool flag) |
|
inline_ BOOL | SkipPrimitiveTests () const |
|
inline_ BOOL | TemporalCoherenceEnabled () const |
|
inline_ BOOL | TemporalHit () const |
|
virtual const char * | ValidateSettings ()=0 |
|
virtual | ~Collider () |
|
|
void | _Collide (const AABBCollisionNode *b0, const AABBCollisionNode *b1) |
|
void | _Collide (const AABBQuantizedNode *b0, const AABBQuantizedNode *b1, const Point &a, const Point &Pa, const Point &b, const Point &Pb) |
|
void | _Collide (const AABBNoLeafNode *a, const AABBNoLeafNode *b) |
|
void | _Collide (const AABBQuantizedNoLeafNode *a, const AABBQuantizedNoLeafNode *b) |
|
void | _CollideBoxTri (const AABBNoLeafNode *b) |
|
void | _CollideBoxTri (const AABBQuantizedNoLeafNode *b) |
|
void | _CollideTriBox (const AABBNoLeafNode *b) |
|
void | _CollideTriBox (const AABBQuantizedNoLeafNode *b) |
|
inline_ BOOL | BoxBoxOverlap (const Point &ea, const Point &ca, const Point &eb, const Point &cb) |
|
bool | CheckTemporalCoherence (Pair *cache) |
|
HRP_COLLISION_EXPORT void | InitQuery (const Matrix4x4 *world0=null, const Matrix4x4 *world1=null) |
|
void | PrimTest (udword id0, udword id1) |
|
inline_ void | PrimTestIndexTri (udword id0) |
|
inline_ void | PrimTestTriIndex (udword id1) |
|
inline_ BOOL | Setup (const MeshInterface *mi0, const MeshInterface *mi1) |
|
inline_ BOOL | TriBoxOverlap (const Point ¢er, const Point &extents) |
|
BOOL | TriTriOverlap (const Point &V0, const Point &V1, const Point &V2, const Point &U0, const Point &U1, const Point &U2) |
|
virtual inline_ void | InitQuery () |
|
inline_ BOOL | Setup (const BaseModel *model) |
|
Definition at line 70 of file Opcode.h.
◆ AABBTreeCollider()
AABBTreeCollider::AABBTreeCollider |
( |
| ) |
|
◆ ~AABBTreeCollider()
AABBTreeCollider::~AABBTreeCollider |
( |
| ) |
|
|
virtual |
◆ _Collide() [1/4]
Recursive collision query for normal AABB trees.
- Parameters
-
b0 | [in] collision node from first tree |
b1 | [in] collision node from second tree |
Definition at line 518 of file OPC_TreeCollider.cpp.
◆ _Collide() [2/4]
Recursive collision query for quantized AABB trees.
- Parameters
-
b0 | [in] collision node from first tree |
b1 | [in] collision node from second tree |
a | [in] extent from box A |
Pa | [in] center from box A |
b | [in] extent from box B |
Pb | [in] center from box B |
Definition at line 804 of file OPC_TreeCollider.cpp.
◆ _Collide() [3/4]
Recursive collision query for no-leaf AABB trees.
- Parameters
-
a | [in] collision node from first tree |
b | [in] collision node from second tree |
Definition at line 709 of file OPC_TreeCollider.cpp.
◆ _Collide() [4/4]
Recursive collision query for quantized no-leaf AABB trees.
- Parameters
-
a | [in] collision node from first tree |
b | [in] collision node from second tree |
Definition at line 914 of file OPC_TreeCollider.cpp.
◆ _CollideBoxTri() [1/2]
Recursive collision of a leaf node from B and a branch from A.
- Parameters
-
b | [in] collision node from first tree |
Definition at line 674 of file OPC_TreeCollider.cpp.
◆ _CollideBoxTri() [2/2]
Recursive collision of a leaf node from B and a quantized branch from A.
- Parameters
-
b | [in] collision node from first tree |
leaf | [in] leaf triangle from second tree |
Definition at line 885 of file OPC_TreeCollider.cpp.
◆ _CollideTriBox() [1/2]
Recursive collision of a leaf node from A and a branch from B.
- Parameters
-
b | [in] collision node from second tree |
Definition at line 650 of file OPC_TreeCollider.cpp.
◆ _CollideTriBox() [2/2]
Recursive collision of a leaf node from A and a quantized branch from B.
- Parameters
-
leaf | [in] leaf triangle from first tree |
b | [in] collision node from second tree |
Definition at line 856 of file OPC_TreeCollider.cpp.
◆ BoxBoxOverlap()
◆ CheckTemporalCoherence()
bool AABBTreeCollider::CheckTemporalCoherence |
( |
Pair * |
cache | ) |
|
|
protected |
Takes advantage of temporal coherence.
- Parameters
-
cache | [in] cache for a pair of previously colliding primitives |
- Returns
- true if we can return immediately
- Warning
- only works for "First Contact" mode
Definition at line 316 of file OPC_TreeCollider.cpp.
◆ Collide() [1/5]
Generic collision query for generic OPCODE models. After the call, access the results with:
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Generic collision query for generic OPCODE models. After the call, access the results with:
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 97 of file OPC_TreeCollider.cpp.
◆ Collide() [2/5]
Collision query for normal AABB trees.
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 349 of file OPC_TreeCollider.cpp.
◆ Collide() [3/5]
Collision query for no-leaf AABB trees.
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 377 of file OPC_TreeCollider.cpp.
◆ Collide() [4/5]
Collision query for quantized AABB trees.
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 405 of file OPC_TreeCollider.cpp.
◆ Collide() [5/5]
Collision query for quantized no-leaf AABB trees.
- Parameters
-
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 |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 448 of file OPC_TreeCollider.cpp.
◆ GetNbBVBVTests()
inline_ udword Opcode::AABBTreeCollider::GetNbBVBVTests |
( |
| ) |
const |
|
inline |
◆ GetNbBVPrimTests()
inline_ udword Opcode::AABBTreeCollider::GetNbBVPrimTests |
( |
| ) |
const |
|
inline |
◆ GetNbPairs()
◆ GetNbPrimPrimTests()
inline_ udword Opcode::AABBTreeCollider::GetNbPrimPrimTests |
( |
| ) |
const |
|
inline |
Stats: gets the number of Triangle-Triangle overlap tests after a collision query.
- See also
- GetNbBVBVTests()
-
GetNbBVPrimTests()
- Returns
- the number of Triangle-Triangle tests performed during last query
Definition at line 145 of file Opcode.h.
◆ GetPairs()
◆ InitQuery()
Initializes a collision query :
- reset stats & contact status
- setup matrices
- Parameters
-
world0 | [in] world matrix for first object |
world1 | [in] world matrix for second object |
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 241 of file OPC_TreeCollider.cpp.
◆ override()
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.
- Returns
- null if everything is ok, else a string describing the problem
◆ PrimTest()
Leaf-leaf test for two primitive indices.
- Parameters
-
id0 | [in] index from first leaf-triangle |
id1 | [in] index from second leaf-triangle |
Definition at line 571 of file OPC_TreeCollider.cpp.
◆ PrimTestIndexTri()
Leaf-leaf test for a previously fetched triangle from tree B (in A's space) and a new leaf from A.
- Parameters
-
id0 | [in] leaf-triangle index from tree A |
Definition at line 628 of file OPC_TreeCollider.cpp.
◆ PrimTestTriIndex()
Leaf-leaf test for a previously fetched triangle from tree A (in B's space) and a new leaf from B.
- Parameters
-
id1 | [in] leaf-triangle index from tree B |
Definition at line 606 of file OPC_TreeCollider.cpp.
◆ setCollisionPairInserter()
◆ SetFullBoxBoxTest()
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)
- Parameters
-
flag | [in] true for full tests, false for coarse tests |
- See also
- SetFullPrimBoxTest(bool flag)
Definition at line 114 of file Opcode.h.
◆ SetFullPrimBoxTest()
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)
- Parameters
-
flag | [in] true for full tests, false for coarse tests |
- See also
- SetFullBoxBoxTest(bool flag)
Definition at line 123 of file Opcode.h.
◆ Setup()
◆ TriBoxOverlap()
◆ TriTriOverlap()
◆ collisionPairInserter
◆ mAR
Absolute rotation matrix.
Definition at line 198 of file Opcode.h.
◆ mCenterCoeff0
Point Opcode::AABBTreeCollider::mCenterCoeff0 |
|
protected |
◆ mCenterCoeff1
Point Opcode::AABBTreeCollider::mCenterCoeff1 |
|
protected |
◆ mExtentsCoeff0
Point Opcode::AABBTreeCollider::mExtentsCoeff0 |
|
protected |
◆ mExtentsCoeff1
Point Opcode::AABBTreeCollider::mExtentsCoeff1 |
|
protected |
◆ mFullBoxBoxTest
bool Opcode::AABBTreeCollider::mFullBoxBoxTest |
|
protected |
Perform full BV-BV tests (true) or SAT-lite tests (false)
Definition at line 218 of file Opcode.h.
◆ mFullPrimBoxTest
bool Opcode::AABBTreeCollider::mFullPrimBoxTest |
|
protected |
Perform full Primitive-BV tests (true) or SAT-lite tests (false)
Definition at line 219 of file Opcode.h.
◆ mId0
udword Opcode::AABBTreeCollider::mId0 |
|
protected |
◆ mId1
udword Opcode::AABBTreeCollider::mId1 |
|
protected |
◆ mIMesh0
User-defined mesh interface for object0.
Definition at line 191 of file Opcode.h.
◆ mIMesh1
User-defined mesh interface for object1.
Definition at line 192 of file Opcode.h.
◆ mLeafIndex
udword Opcode::AABBTreeCollider::mLeafIndex |
|
protected |
◆ mLeafVerts
Point Opcode::AABBTreeCollider::mLeafVerts[3] |
|
protected |
◆ mNbBVBVTests
udword Opcode::AABBTreeCollider::mNbBVBVTests |
|
protected |
Number of BV-BV tests.
Definition at line 194 of file Opcode.h.
◆ mNbBVPrimTests
udword Opcode::AABBTreeCollider::mNbBVPrimTests |
|
protected |
Number of BV-Primitive tests.
Definition at line 196 of file Opcode.h.
◆ mNbPrimPrimTests
udword Opcode::AABBTreeCollider::mNbPrimPrimTests |
|
protected |
Number of Primitive-Primitive tests.
Definition at line 195 of file Opcode.h.
◆ mNowNode0
◆ mNowNode1
◆ mPairs
◆ mR0to1
Rotation from object0 to object1.
Definition at line 199 of file Opcode.h.
◆ mR1to0
Rotation from object1 to object0.
Definition at line 200 of file Opcode.h.
◆ mT0to1
Point Opcode::AABBTreeCollider::mT0to1 |
|
protected |
Translation from object0 to object1.
Definition at line 201 of file Opcode.h.
◆ mT1to0
Point Opcode::AABBTreeCollider::mT1to0 |
|
protected |
Translation from object1 to object0.
Definition at line 202 of file Opcode.h.
The documentation for this class was generated from the following files: