#include <Opcode.h>
Constructor.
Definition at line 205 of file OPC_RayCollider.cpp.
RayCollider::~RayCollider | ( | ) | [virtual] |
Destructor.
Definition at line 228 of file OPC_RayCollider.cpp.
void RayCollider::_RayStab | ( | const AABBCollisionNode * | node | ) | [protected] |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 633 of file OPC_RayCollider.cpp.
void RayCollider::_RayStab | ( | const AABBNoLeafNode * | node | ) | [protected] |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 688 of file OPC_RayCollider.cpp.
void RayCollider::_RayStab | ( | const AABBQuantizedNode * | node | ) | [protected] |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 658 of file OPC_RayCollider.cpp.
void RayCollider::_RayStab | ( | const AABBQuantizedNoLeafNode * | node | ) | [protected] |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 714 of file OPC_RayCollider.cpp.
void RayCollider::_RayStab | ( | const AABBTreeNode * | node, |
Container & | box_indices | ||
) | [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.
void RayCollider::_SegmentStab | ( | const AABBCollisionNode * | node | ) | [protected] |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 495 of file OPC_RayCollider.cpp.
void RayCollider::_SegmentStab | ( | const AABBNoLeafNode * | node | ) | [protected] |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 550 of file OPC_RayCollider.cpp.
void RayCollider::_SegmentStab | ( | const AABBQuantizedNode * | node | ) | [protected] |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 520 of file OPC_RayCollider.cpp.
void RayCollider::_SegmentStab | ( | const AABBQuantizedNoLeafNode * | node | ) | [protected] |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 576 of file OPC_RayCollider.cpp.
void RayCollider::_SegmentStab | ( | const AABBTreeNode * | node, |
Container & | box_indices | ||
) | [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.
inline_ udword Opcode::RayCollider::GetNbIntersections | ( | ) | const [inline] |
Stats: gets the number of intersection found after a collision query. Can be used for in/out tests.
inline_ udword Opcode::RayCollider::GetNbRayBVTests | ( | ) | const [inline] |
Stats: gets the number of Ray-BV overlap tests after a collision query.
inline_ udword Opcode::RayCollider::GetNbRayPrimTests | ( | ) | const [inline] |
Stats: gets the number of Ray-Triangle overlap tests after a collision query.
BOOL RayCollider::InitQuery | ( | const Ray & | world_ray, |
const Matrix4x4 * | world = null , |
||
udword * | face_id = null |
||
) | [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.
inline_ BOOL Opcode::RayCollider::RayAABBOverlap | ( | const Point & | center, |
const Point & | extents | ||
) | [protected] |
inline_ BOOL Opcode::RayCollider::RayTriOverlap | ( | const Point & | vert0, |
const Point & | vert1, | ||
const Point & | vert2 | ||
) | [protected] |
inline_ BOOL Opcode::RayCollider::SegmentAABBOverlap | ( | const Point & | center, |
const Point & | extents | ||
) | [protected] |
inline_ void Opcode::RayCollider::SetCulling | ( | bool | flag | ) | [inline] |
Settings: enable or disable backface culling.
flag | [in] true to enable backface culling |
inline_ void Opcode::RayCollider::SetHitCallback | ( | HitCallback | cb | ) | [inline] |
inline_ void Opcode::RayCollider::SetMaxDist | ( | float | max_dist = MAX_FLOAT | ) | [inline] |
Settings: sets the higher distance bound.
max_dist | [in] higher distance bound. Default = maximal value, for ray queries (else segment) |
inline_ void Opcode::RayCollider::SetUserData | ( | void * | user_data | ) | [inline] |
Point Opcode::RayCollider::mCenterCoeff [protected] |
bool Opcode::RayCollider::mCulling [protected] |
Point Opcode::RayCollider::mData [protected] |
Point Opcode::RayCollider::mData2 [protected] |
Point Opcode::RayCollider::mDir [protected] |
Point Opcode::RayCollider::mExtentsCoeff [protected] |
Point Opcode::RayCollider::mFDir [protected] |
HitCallback Opcode::RayCollider::mHitCallback [protected] |
float Opcode::RayCollider::mMaxDist [protected] |
udword Opcode::RayCollider::mNbIntersections [protected] |
udword Opcode::RayCollider::mNbRayBVTests [protected] |
udword Opcode::RayCollider::mNbRayPrimTests [protected] |
Point Opcode::RayCollider::mOrigin [protected] |
CollisionFace Opcode::RayCollider::mStabbedFace [protected] |
void* Opcode::RayCollider::mUserData [protected] |