#include <Opcode.h>
Definition at line 64 of file Opcode.h.
◆ RayCollider()
RayCollider::RayCollider |
( |
| ) |
|
◆ ~RayCollider()
RayCollider::~RayCollider |
( |
| ) |
|
|
virtual |
◆ _RayStab() [1/5]
Recursive stabbing query for normal AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 633 of file OPC_RayCollider.cpp.
◆ _RayStab() [2/5]
Recursive stabbing query for no-leaf AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 688 of file OPC_RayCollider.cpp.
◆ _RayStab() [3/5]
Recursive stabbing query for quantized AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 658 of file OPC_RayCollider.cpp.
◆ _RayStab() [4/5]
Recursive stabbing query for quantized no-leaf AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 714 of file OPC_RayCollider.cpp.
◆ _RayStab() [5/5]
Recursive stabbing query for vanilla AABB trees.
- Parameters
-
node | [in] current collision node |
box_indices | [out] indices of stabbed boxes |
Definition at line 746 of file OPC_RayCollider.cpp.
◆ _SegmentStab() [1/5]
Recursive stabbing query for normal AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 495 of file OPC_RayCollider.cpp.
◆ _SegmentStab() [2/5]
Recursive stabbing query for no-leaf AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 550 of file OPC_RayCollider.cpp.
◆ _SegmentStab() [3/5]
Recursive stabbing query for quantized AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 520 of file OPC_RayCollider.cpp.
◆ _SegmentStab() [4/5]
Recursive stabbing query for quantized no-leaf AABB trees.
- Parameters
-
node | [in] current collision node |
Definition at line 576 of file OPC_RayCollider.cpp.
◆ _SegmentStab() [5/5]
Recursive stabbing query for vanilla AABB trees.
- Parameters
-
node | [in] current collision node |
box_indices | [out] indices of stabbed boxes |
Definition at line 608 of file OPC_RayCollider.cpp.
◆ Collide() [1/2]
Generic stabbing query for generic OPCODE models. After the call, access the results:
- Parameters
-
world_ray | [in] stabbing ray in world space |
model | [in] Opcode model to collide with |
world | [in] model's world matrix, or null |
cache | [in] a possibly cached face index, or null |
- Returns
- true if success
- Warning
- SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.
Definition at line 264 of file OPC_RayCollider.cpp.
◆ Collide() [2/2]
Stabbing query for vanilla AABB trees.
- Parameters
-
world_ray | [in] stabbing ray in world space |
tree | [in] AABB tree |
box_indices | [out] indices of stabbed boxes |
- Returns
- true if success
Definition at line 465 of file OPC_RayCollider.cpp.
◆ GetNbIntersections()
Stats: gets the number of intersection found after a collision query. Can be used for in/out tests.
- See also
- GetNbRayBVTests()
-
GetNbRayPrimTests()
- Returns
- the number of valid intersections during last query
Definition at line 169 of file Opcode.h.
◆ GetNbRayBVTests()
◆ GetNbRayPrimTests()
◆ InitQuery()
Initializes a stabbing query :
- reset stats & contact status
- compute ray in local space
- check temporal coherence
- Parameters
-
world_ray | [in] stabbing ray in world space |
world | [in] object's world matrix, or null |
face_id | [in] index of previously stabbed triangle |
- Returns
- TRUE if we can return immediately
- Warning
- SCALE NOT SUPPORTED. The matrix must contain rotation & translation parts only.
Definition at line 339 of file OPC_RayCollider.cpp.
◆ override()
Opcode::RayCollider::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
◆ RayAABBOverlap()
◆ RayTriOverlap()
◆ SegmentAABBOverlap()
◆ SetCulling()
inline_ void Opcode::RayCollider::SetCulling |
( |
bool |
flag | ) |
|
|
inline |
Settings: enable or disable backface culling.
- Parameters
-
flag | [in] true to enable backface culling |
- See also
- SetClosestHit(bool flag)
-
SetMaxDist(float max_dist)
-
SetDestination(StabbedFaces* sf)
Definition at line 111 of file Opcode.h.
◆ SetHitCallback()
◆ SetMaxDist()
Settings: sets the higher distance bound.
- Parameters
-
max_dist | [in] higher distance bound. Default = maximal value, for ray queries (else segment) |
- See also
- SetClosestHit(bool flag)
-
SetCulling(bool flag)
-
SetDestination(StabbedFaces* sf)
Definition at line 122 of file Opcode.h.
◆ SetUserData()
◆ mCenterCoeff
Point Opcode::RayCollider::mCenterCoeff |
|
protected |
◆ mCulling
bool Opcode::RayCollider::mCulling |
|
protected |
Stab culled faces or not.
Definition at line 206 of file Opcode.h.
◆ mData
Point Opcode::RayCollider::mData |
|
protected |
◆ mData2
Point Opcode::RayCollider::mData2 |
|
protected |
◆ mDir
Point Opcode::RayCollider::mDir |
|
protected |
◆ mExtentsCoeff
Point Opcode::RayCollider::mExtentsCoeff |
|
protected |
◆ mFDir
Point Opcode::RayCollider::mFDir |
|
protected |
◆ mHitCallback
Callback used to record a hit.
Definition at line 188 of file Opcode.h.
◆ mMaxDist
float Opcode::RayCollider::mMaxDist |
|
protected |
Valid segment on the ray.
Definition at line 202 of file Opcode.h.
◆ mNbIntersections
udword Opcode::RayCollider::mNbIntersections |
|
protected |
Number of valid intersections.
Definition at line 197 of file Opcode.h.
◆ mNbRayBVTests
udword Opcode::RayCollider::mNbRayBVTests |
|
protected |
Number of Ray-BV tests.
Definition at line 194 of file Opcode.h.
◆ mNbRayPrimTests
udword Opcode::RayCollider::mNbRayPrimTests |
|
protected |
Number of Ray-Primitive tests.
Definition at line 195 of file Opcode.h.
◆ mOrigin
Point Opcode::RayCollider::mOrigin |
|
protected |
◆ mStabbedFace
Current stabbed face.
Definition at line 186 of file Opcode.h.
◆ mUserData
void* Opcode::RayCollider::mUserData |
|
protected |
User-defined data.
Definition at line 189 of file Opcode.h.
The documentation for this class was generated from the following files: