#include <Opcode.h>
Protected Attributes | |
Point | mCenterCoeff |
bool | mCulling |
Stab culled faces or not. More... | |
Point | mData |
Point | mData2 |
Point | mDir |
Ray direction (normalized) More... | |
Point | mExtentsCoeff |
Point | mFDir |
fabsf(mDir) More... | |
HitCallback | mHitCallback |
Callback used to record a hit. More... | |
float | mMaxDist |
Valid segment on the ray. More... | |
udword | mNbIntersections |
Number of valid intersections. More... | |
udword | mNbRayBVTests |
Number of Ray-BV tests. More... | |
udword | mNbRayPrimTests |
Number of Ray-Primitive tests. More... | |
Point | mOrigin |
Ray origin. More... | |
CollisionFace | mStabbedFace |
Current stabbed face. More... | |
void * | mUserData |
User-defined data. 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... | |
RayCollider::RayCollider | ( | ) |
Constructor.
Definition at line 205 of file OPC_RayCollider.cpp.
|
virtual |
Destructor.
Definition at line 228 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 633 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 688 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 658 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 714 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for vanilla AABB trees.
node | [in] current collision node |
box_indices | [out] indices of stabbed boxes |
Definition at line 746 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 495 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 550 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 520 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 576 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for vanilla AABB trees.
node | [in] current collision node |
box_indices | [out] indices of stabbed boxes |
Definition at line 608 of file OPC_RayCollider.cpp.
bool RayCollider::Collide | ( | const Ray & | world_ray, |
const Model & | model, | ||
const Matrix4x4 * | world = null , |
||
udword * | cache = null |
||
) |
Generic stabbing query for generic OPCODE models. After the call, access the results:
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 |
Definition at line 264 of file OPC_RayCollider.cpp.
Stabbing query for vanilla AABB trees.
world_ray | [in] stabbing ray in world space |
tree | [in] AABB tree |
box_indices | [out] indices of stabbed boxes |
Definition at line 465 of file OPC_RayCollider.cpp.
Stats: gets the number of intersection found after a collision query. Can be used for in/out tests.
Stats: gets the number of Ray-BV overlap tests after a collision query.
Stats: gets the number of Ray-Triangle overlap tests after a collision query.
|
protected |
Initializes a stabbing query :
world_ray | [in] stabbing ray in world space |
world | [in] object's world matrix, or null |
face_id | [in] index of previously stabbed triangle |
Definition at line 339 of file OPC_RayCollider.cpp.
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.
|
protected |
|
protected |
|
protected |
Settings: enable or disable backface culling.
flag | [in] true to enable backface culling |
|
inline |
Settings: sets the higher distance bound.
max_dist | [in] higher distance bound. Default = maximal value, for ray queries (else segment) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |