Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <Opcode.h>
Protected Member Functions | |
void | _SegmentStab (const AABBCollisionNode *node) |
void | _SegmentStab (const AABBNoLeafNode *node) |
void | _SegmentStab (const AABBQuantizedNode *node) |
void | _SegmentStab (const AABBQuantizedNoLeafNode *node) |
void | _SegmentStab (const AABBTreeNode *node, Container &box_indices) |
void | _RayStab (const AABBCollisionNode *node) |
void | _RayStab (const AABBNoLeafNode *node) |
void | _RayStab (const AABBQuantizedNode *node) |
void | _RayStab (const AABBQuantizedNoLeafNode *node) |
void | _RayStab (const AABBTreeNode *node, Container &box_indices) |
inline_ bool | RayAABBOverlap (const Point ¢er, const Point &extents) |
inline_ bool | SegmentAABBOverlap (const Point ¢er, const Point &extents) |
inline_ bool | RayTriOverlap (const Point &vert0, const Point &vert1, const Point &vert2) |
bool | InitQuery (const Ray &world_ray, const Matrix4x4 *world=null, udword *face_id=null) |
![]() | |
inline_ BOOL | Setup (const BaseModel *model) |
virtual inline_ void | InitQuery () |
Protected Attributes | |
Point | mOrigin |
Ray origin. More... | |
Point | mDir |
Ray direction (normalized) More... | |
Point | mFDir |
fabsf(mDir) More... | |
Point | mData |
Point | mData2 |
CollisionFace | mStabbedFace |
Current stabbed face. More... | |
HitCallback | mHitCallback |
Callback used to record a hit. More... | |
void * | mUserData |
User-defined data. More... | |
udword | mNbRayBVTests |
Number of Ray-BV tests. More... | |
udword | mNbRayPrimTests |
Number of Ray-Primitive tests. More... | |
udword | mNbIntersections |
Number of valid intersections. More... | |
Point | mCenterCoeff |
Point | mExtentsCoeff |
float | mMaxDist |
Valid segment on the ray. More... | |
bool | mCulling |
Stab culled faces or not. More... | |
![]() | |
udword | mFlags |
Bit flags. More... | |
const BaseModel * | mCurrentModel |
Current model for collision query (owner of touched faces) More... | |
const MeshInterface * | mIMesh |
User-defined mesh interface. More... | |
RayCollider::RayCollider | ( | ) |
|
virtual |
|
protected |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 634 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 689 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 659 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 715 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 747 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for normal AABB trees.
node | [in] current collision node |
Definition at line 496 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for no-leaf AABB trees.
node | [in] current collision node |
Definition at line 551 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized AABB trees.
node | [in] current collision node |
Definition at line 521 of file OPC_RayCollider.cpp.
|
protected |
Recursive stabbing query for quantized no-leaf AABB trees.
node | [in] current collision node |
Definition at line 577 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 609 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 265 of file OPC_RayCollider.cpp.
Referenced by Opcode::Picking().
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 466 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 340 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 |
Definition at line 111 of file Opcode.h.
Referenced by Opcode::Picking().
|
inline |
Definition at line 125 of file Opcode.h.
Referenced by Opcode::Picking(), Opcode::SetupAllHits(), Opcode::SetupClosestHit(), Opcode::SetupInOutTest(), and Opcode::SetupShadowFeeler().
Settings: sets the higher distance bound.
max_dist | [in] higher distance bound. Default = maximal value, for ray queries (else segment) |
Definition at line 122 of file Opcode.h.
Referenced by Opcode::Picking().
|
inline |
Definition at line 126 of file Opcode.h.
Referenced by Opcode::Picking(), Opcode::SetupAllHits(), and Opcode::SetupClosestHit().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |