Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Opcode::RayCollider Class Reference

#include <Opcode.h>

Inheritance diagram for Opcode::RayCollider:
Opcode::Collider

Public Member Functions

 RayCollider ()
 
virtual ~RayCollider ()
 
bool Collide (const Ray &world_ray, const Model &model, const Matrix4x4 *world=null, udword *cache=null)
 
bool Collide (const Ray &world_ray, const AABBTree *tree, Container &box_indices)
 
inline_ void SetCulling (bool flag)
 
inline_ void SetMaxDist (float max_dist=MAX_FLOAT)
 
inline_ void SetHitCallback (HitCallback cb)
 
inline_ void SetUserData (void *user_data)
 
inline_ udword GetNbRayBVTests () const
 
inline_ udword GetNbRayPrimTests () const
 
inline_ udword GetNbIntersections () const
 
 override (Collider) const char *ValidateSettings()
 
- Public Member Functions inherited from Opcode::Collider
 Collider ()
 
virtual ~Collider ()
 
inline_ BOOL GetContactStatus () const
 
inline_ BOOL FirstContactEnabled () const
 
inline_ BOOL TemporalCoherenceEnabled () const
 
inline_ BOOL ContactFound () const
 
inline_ BOOL TemporalHit () const
 
inline_ BOOL SkipPrimitiveTests () const
 
inline_ void SetFirstContact (bool flag)
 
inline_ void SetTemporalCoherence (bool flag)
 
inline_ void SetPrimitiveTests (bool flag)
 
virtual const char * ValidateSettings ()=0
 

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 &center, const Point &extents)
 
inline_ bool SegmentAABBOverlap (const Point &center, 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)
 
- Protected Member Functions inherited from Opcode::Collider
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...
 
- Protected Attributes inherited from Opcode::Collider
udword mFlags
 Bit flags. More...
 
const BaseModelmCurrentModel
 Current model for collision query (owner of touched faces) More...
 
const MeshInterfacemIMesh
 User-defined mesh interface. More...
 

Detailed Description

Definition at line 64 of file Opcode.h.

Constructor & Destructor Documentation

RayCollider::RayCollider ( )

Constructor.

Definition at line 206 of file OPC_RayCollider.cpp.

206  :
207 #ifdef OPC_RAYHIT_CALLBACK
208  mHitCallback (null),
209  mUserData (0),
210 #else
211  mStabbedFaces (null),
212 #endif
213  mNbRayBVTests (0),
214  mNbRayPrimTests (0),
215  mNbIntersections (0),
217 #ifndef OPC_RAYHIT_CALLBACK
218  mClosestHit (false),
219 #endif
220  mCulling (true)
221 {
222 }
RayCollider::~RayCollider ( )
virtual

Destructor.

Definition at line 229 of file OPC_RayCollider.cpp.

230 {
231 }

Member Function Documentation

void RayCollider::_RayStab ( const AABBCollisionNode node)
protected

Recursive stabbing query for normal AABB trees.

Parameters
node[in] current collision node

Definition at line 634 of file OPC_RayCollider.cpp.

635 {
636  // Perform Ray-AABB overlap test
637  if(!RayAABBOverlap(node->mAABB.mCenter, node->mAABB.mExtents)) return;
638 
639  if(node->IsLeaf())
640  {
641  RAY_PRIM(node->GetPrimitive(), OPC_CONTACT)
642  }
643  else
644  {
645  _RayStab(node->GetPos());
646 
647  if(ContactFound()) return;
648 
649  _RayStab(node->GetNeg());
650  }
651 }
void RayCollider::_RayStab ( const AABBNoLeafNode node)
protected

Recursive stabbing query for no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 689 of file OPC_RayCollider.cpp.

690 {
691  // Perform Ray-AABB overlap test
692  if(!RayAABBOverlap(node->mAABB.mCenter, node->mAABB.mExtents)) return;
693 
694  if(node->HasPosLeaf())
695  {
696  RAY_PRIM(node->GetPosPrimitive(), OPC_CONTACT)
697  }
698  else _RayStab(node->GetPos());
699 
700  if(ContactFound()) return;
701 
702  if(node->HasNegLeaf())
703  {
704  RAY_PRIM(node->GetNegPrimitive(), OPC_CONTACT)
705  }
706  else _RayStab(node->GetNeg());
707 }
void RayCollider::_RayStab ( const AABBQuantizedNode node)
protected

Recursive stabbing query for quantized AABB trees.

Parameters
node[in] current collision node

Definition at line 659 of file OPC_RayCollider.cpp.

660 {
661  // Dequantize box
662  const QuantizedAABB& Box = node->mAABB;
663  const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
664  const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
665 
666  // Perform Ray-AABB overlap test
667  if(!RayAABBOverlap(Center, Extents)) return;
668 
669  if(node->IsLeaf())
670  {
671  RAY_PRIM(node->GetPrimitive(), OPC_CONTACT)
672  }
673  else
674  {
675  _RayStab(node->GetPos());
676 
677  if(ContactFound()) return;
678 
679  _RayStab(node->GetNeg());
680  }
681 }
void RayCollider::_RayStab ( const AABBQuantizedNoLeafNode node)
protected

Recursive stabbing query for quantized no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 715 of file OPC_RayCollider.cpp.

716 {
717  // Dequantize box
718  const QuantizedAABB& Box = node->mAABB;
719  const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
720  const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
721 
722  // Perform Ray-AABB overlap test
723  if(!RayAABBOverlap(Center, Extents)) return;
724 
725  if(node->HasPosLeaf())
726  {
727  RAY_PRIM(node->GetPosPrimitive(), OPC_CONTACT)
728  }
729  else _RayStab(node->GetPos());
730 
731  if(ContactFound()) return;
732 
733  if(node->HasNegLeaf())
734  {
735  RAY_PRIM(node->GetNegPrimitive(), OPC_CONTACT)
736  }
737  else _RayStab(node->GetNeg());
738 }
void RayCollider::_RayStab ( const AABBTreeNode node,
Container box_indices 
)
protected

Recursive stabbing query for vanilla AABB trees.

Parameters
node[in] current collision node
box_indices[out] indices of stabbed boxes

Definition at line 747 of file OPC_RayCollider.cpp.

748 {
749  // Test the box against the ray
750  Point Center, Extents;
751  node->GetAABB()->GetCenter(Center);
752  node->GetAABB()->GetExtents(Extents);
753  if(!RayAABBOverlap(Center, Extents)) return;
754  if(node->IsLeaf())
755  {
756  mFlags |= OPC_CONTACT;
757  box_indices.Add(node->GetPrimitives(), node->GetNbPrimitives());
758  }
759  else
760  {
761  _RayStab(node->GetPos(), box_indices);
762  _RayStab(node->GetNeg(), box_indices);
763  }
764 }
void RayCollider::_SegmentStab ( const AABBCollisionNode node)
protected

Recursive stabbing query for normal AABB trees.

Parameters
node[in] current collision node

Definition at line 496 of file OPC_RayCollider.cpp.

497 {
498  // Perform Segment-AABB overlap test
499  if(!SegmentAABBOverlap(node->mAABB.mCenter, node->mAABB.mExtents)) return;
500 
501  if(node->IsLeaf())
502  {
503  SEGMENT_PRIM(node->GetPrimitive(), OPC_CONTACT)
504  }
505  else
506  {
507  _SegmentStab(node->GetPos());
508 
509  if(ContactFound()) return;
510 
511  _SegmentStab(node->GetNeg());
512  }
513 }
void RayCollider::_SegmentStab ( const AABBNoLeafNode node)
protected

Recursive stabbing query for no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 551 of file OPC_RayCollider.cpp.

552 {
553  // Perform Segment-AABB overlap test
554  if(!SegmentAABBOverlap(node->mAABB.mCenter, node->mAABB.mExtents)) return;
555 
556  if(node->HasPosLeaf())
557  {
558  SEGMENT_PRIM(node->GetPosPrimitive(), OPC_CONTACT)
559  }
560  else _SegmentStab(node->GetPos());
561 
562  if(ContactFound()) return;
563 
564  if(node->HasNegLeaf())
565  {
566  SEGMENT_PRIM(node->GetNegPrimitive(), OPC_CONTACT)
567  }
568  else _SegmentStab(node->GetNeg());
569 }
void RayCollider::_SegmentStab ( const AABBQuantizedNode node)
protected

Recursive stabbing query for quantized AABB trees.

Parameters
node[in] current collision node

Definition at line 521 of file OPC_RayCollider.cpp.

522 {
523  // Dequantize box
524  const QuantizedAABB& Box = node->mAABB;
525  const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
526  const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
527 
528  // Perform Segment-AABB overlap test
529  if(!SegmentAABBOverlap(Center, Extents)) return;
530 
531  if(node->IsLeaf())
532  {
533  SEGMENT_PRIM(node->GetPrimitive(), OPC_CONTACT)
534  }
535  else
536  {
537  _SegmentStab(node->GetPos());
538 
539  if(ContactFound()) return;
540 
541  _SegmentStab(node->GetNeg());
542  }
543 }
void RayCollider::_SegmentStab ( const AABBQuantizedNoLeafNode node)
protected

Recursive stabbing query for quantized no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 577 of file OPC_RayCollider.cpp.

578 {
579  // Dequantize box
580  const QuantizedAABB& Box = node->mAABB;
581  const Point Center(float(Box.mCenter[0]) * mCenterCoeff.x, float(Box.mCenter[1]) * mCenterCoeff.y, float(Box.mCenter[2]) * mCenterCoeff.z);
582  const Point Extents(float(Box.mExtents[0]) * mExtentsCoeff.x, float(Box.mExtents[1]) * mExtentsCoeff.y, float(Box.mExtents[2]) * mExtentsCoeff.z);
583 
584  // Perform Segment-AABB overlap test
585  if(!SegmentAABBOverlap(Center, Extents)) return;
586 
587  if(node->HasPosLeaf())
588  {
589  SEGMENT_PRIM(node->GetPosPrimitive(), OPC_CONTACT)
590  }
591  else _SegmentStab(node->GetPos());
592 
593  if(ContactFound()) return;
594 
595  if(node->HasNegLeaf())
596  {
597  SEGMENT_PRIM(node->GetNegPrimitive(), OPC_CONTACT)
598  }
599  else _SegmentStab(node->GetNeg());
600 }
void RayCollider::_SegmentStab ( const AABBTreeNode node,
Container box_indices 
)
protected

Recursive stabbing query for vanilla AABB trees.

Parameters
node[in] current collision node
box_indices[out] indices of stabbed boxes

Definition at line 609 of file OPC_RayCollider.cpp.

610 {
611  // Test the box against the segment
612  Point Center, Extents;
613  node->GetAABB()->GetCenter(Center);
614  node->GetAABB()->GetExtents(Extents);
615  if(!SegmentAABBOverlap(Center, Extents)) return;
616 
617  if(node->IsLeaf())
618  {
619  box_indices.Add(node->GetPrimitives(), node->GetNbPrimitives());
620  }
621  else
622  {
623  _SegmentStab(node->GetPos(), box_indices);
624  _SegmentStab(node->GetNeg(), box_indices);
625  }
626 }
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:

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 265 of file OPC_RayCollider.cpp.

Referenced by Opcode::Picking().

266 {
267  // Checkings
268  if(!Setup(&model)) return false;
269 
270  // Init collision query
271  if(InitQuery(world_ray, world, cache)) return true;
272 
273  if(!model.HasLeafNodes())
274  {
275  if(model.IsQuantized())
276  {
277  const AABBQuantizedNoLeafTree* Tree = (const AABBQuantizedNoLeafTree*)model.GetTree();
278 
279  // Setup dequantization coeffs
280  mCenterCoeff = Tree->mCenterCoeff;
282 
283  // Perform stabbing query
284  if(IR(mMaxDist)!=IEEE_MAX_FLOAT) _SegmentStab(Tree->GetNodes());
285  else _RayStab(Tree->GetNodes());
286  }
287  else
288  {
289  const AABBNoLeafTree* Tree = (const AABBNoLeafTree*)model.GetTree();
290 
291  // Perform stabbing query
292  if(IR(mMaxDist)!=IEEE_MAX_FLOAT) _SegmentStab(Tree->GetNodes());
293  else _RayStab(Tree->GetNodes());
294  }
295  }
296  else
297  {
298  if(model.IsQuantized())
299  {
300  const AABBQuantizedTree* Tree = (const AABBQuantizedTree*)model.GetTree();
301 
302  // Setup dequantization coeffs
303  mCenterCoeff = Tree->mCenterCoeff;
305 
306  // Perform stabbing query
307  if(IR(mMaxDist)!=IEEE_MAX_FLOAT) _SegmentStab(Tree->GetNodes());
308  else _RayStab(Tree->GetNodes());
309  }
310  else
311  {
312  const AABBCollisionTree* Tree = (const AABBCollisionTree*)model.GetTree();
313 
314  // Perform stabbing query
315  if(IR(mMaxDist)!=IEEE_MAX_FLOAT) _SegmentStab(Tree->GetNodes());
316  else _RayStab(Tree->GetNodes());
317  }
318  }
319 
320  // Update cache if needed
322  return true;
323 }
bool RayCollider::Collide ( const Ray world_ray,
const AABBTree tree,
Container box_indices 
)

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 466 of file OPC_RayCollider.cpp.

467 {
468  // ### bad design here
469 
470  // This is typically called for a scene tree, full of -AABBs-, not full of triangles.
471  // So we don't really have "primitives" to deal with. Hence it doesn't work with
472  // "FirstContact" + "TemporalCoherence".
474 
475  // Checkings
476  if(!tree) return false;
477 
478  // Init collision query
479  // Basically this is only called to initialize precomputed data
480  if(InitQuery(world_ray)) return true;
481 
482  // Perform stabbing query
483  if(IR(mMaxDist)!=IEEE_MAX_FLOAT) _SegmentStab(tree, box_indices);
484  else _RayStab(tree, box_indices);
485 
486  return true;
487 }
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.

See Also
GetNbRayBVTests()
GetNbRayPrimTests()
Returns
the number of valid intersections during last query

Definition at line 169 of file Opcode.h.

inline_ udword Opcode::RayCollider::GetNbRayBVTests ( ) const
inline

Stats: gets the number of Ray-BV overlap tests after a collision query.

See Also
GetNbRayPrimTests()
GetNbIntersections()
Returns
the number of Ray-BV tests performed during last query

Definition at line 148 of file Opcode.h.

inline_ udword Opcode::RayCollider::GetNbRayPrimTests ( ) const
inline

Stats: gets the number of Ray-Triangle overlap tests after a collision query.

See Also
GetNbRayBVTests()
GetNbIntersections()
Returns
the number of Ray-Triangle tests performed during last query

Definition at line 158 of file Opcode.h.

bool RayCollider::InitQuery ( const Ray world_ray,
const Matrix4x4 world = null,
udword face_id = null 
)
protected

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 340 of file OPC_RayCollider.cpp.

341 {
342  // Reset stats & contact status
344  mNbRayBVTests = 0;
345  mNbRayPrimTests = 0;
346  mNbIntersections = 0;
347 #ifndef OPC_RAYHIT_CALLBACK
348  if(mStabbedFaces) mStabbedFaces->Reset();
349 #endif
350 
351  // Compute ray in local space
352  // The (Origin/Dir) form is needed for the ray-triangle test anyway (even for segment tests)
353  if(world)
354  {
355  Matrix3x3 InvWorld = *world;
356  mDir = InvWorld * world_ray.mDir;
357 
358  Matrix4x4 World;
359  InvertPRMatrix(World, *world);
360  mOrigin = world_ray.mOrig * World;
361  }
362  else
363  {
364  mDir = world_ray.mDir;
365  mOrigin = world_ray.mOrig;
366  }
367 
368  // 4) Special case: 1-triangle meshes [Opcode 1.3]
370  {
371  // We simply perform the BV-Prim overlap test each time. We assume single triangle has index 0.
372  if(!SkipPrimitiveTests())
373  {
374  // Perform overlap test between the unique triangle and the ray (and set contact status if needed)
376 
377  // Return immediately regardless of status
378  return TRUE;
379  }
380  }
381 
382  // Check temporal coherence :
383 
384  // Test previously colliding primitives first
385  if(TemporalCoherenceEnabled() && FirstContactEnabled() && face_id && *face_id!=INVALID_ID)
386  {
387 #ifdef OLD_CODE
388 #ifndef OPC_RAYHIT_CALLBACK
389  if(!mClosestHit)
390 #endif
391  {
392  // Request vertices from the app
393  VertexPointers VP;
394  mIMesh->GetTriangle(VP, *face_id);
395  // Perform ray-cached tri overlap test
396  if(RayTriOverlap(*VP.Vertex[0], *VP.Vertex[1], *VP.Vertex[2]))
397  {
398  // Intersection point is valid if:
399  // - distance is positive (else it can just be a face behind the orig point)
400  // - distance is smaller than a given max distance (useful for shadow feelers)
401 // if(mStabbedFace.mDistance>0.0f && mStabbedFace.mDistance<mMaxDist)
402  if(IR(mStabbedFace.mDistance)<IR(mMaxDist)) // The other test is already performed in RayTriOverlap
403  {
404  // Set contact status
406 
407  mStabbedFace.mFaceID = *face_id;
408 
409 #ifndef OPC_RAYHIT_CALLBACK
410  if(mStabbedFaces) mStabbedFaces->AddFace(mStabbedFace);
411 #endif
412  return TRUE;
413  }
414  }
415  }
416 #else
417  // New code
418  // We handle both Segment/ray queries with the same segment code, and a possible infinite limit
420 
421  // Return immediately if possible
422  if(GetContactStatus()) return TRUE;
423 #endif
424  }
425 
426  // Precompute data (moved after temporal coherence since only needed for ray-AABB)
428  {
429  // For Segment-AABB overlap
430  mData = 0.5f * mDir * mMaxDist;
431  mData2 = mOrigin + mData;
432 
433  // Precompute mFDir;
434  mFDir.x = fabsf(mData.x);
435  mFDir.y = fabsf(mData.y);
436  mFDir.z = fabsf(mData.z);
437  }
438  else
439  {
440  // For Ray-AABB overlap
441 // udword x = SIR(mDir.x)-1;
442 // udword y = SIR(mDir.y)-1;
443 // udword z = SIR(mDir.z)-1;
444 // mData.x = FR(x);
445 // mData.y = FR(y);
446 // mData.z = FR(z);
447 
448  // Precompute mFDir;
449  mFDir.x = fabsf(mDir.x);
450  mFDir.y = fabsf(mDir.y);
451  mFDir.z = fabsf(mDir.z);
452  }
453 
454  return FALSE;
455 }
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
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.

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.

Referenced by Opcode::Picking().

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.

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.

Referenced by Opcode::Picking().

inline_ void Opcode::RayCollider::SetUserData ( void *  user_data)
inline

Definition at line 126 of file Opcode.h.

Referenced by Opcode::Picking(), Opcode::SetupAllHits(), and Opcode::SetupClosestHit().

Member Data Documentation

Point Opcode::RayCollider::mCenterCoeff
protected

Definition at line 199 of file Opcode.h.

bool Opcode::RayCollider::mCulling
protected

Stab culled faces or not.

Definition at line 206 of file Opcode.h.

Point Opcode::RayCollider::mData
protected

Definition at line 184 of file Opcode.h.

Point Opcode::RayCollider::mData2
protected

Definition at line 184 of file Opcode.h.

Point Opcode::RayCollider::mDir
protected

Ray direction (normalized)

Definition at line 182 of file Opcode.h.

Point Opcode::RayCollider::mExtentsCoeff
protected

Definition at line 200 of file Opcode.h.

Point Opcode::RayCollider::mFDir
protected

fabsf(mDir)

Definition at line 183 of file Opcode.h.

HitCallback Opcode::RayCollider::mHitCallback
protected

Callback used to record a hit.

Definition at line 188 of file Opcode.h.

float Opcode::RayCollider::mMaxDist
protected

Valid segment on the ray.

Definition at line 202 of file Opcode.h.

udword Opcode::RayCollider::mNbIntersections
protected

Number of valid intersections.

Definition at line 197 of file Opcode.h.

udword Opcode::RayCollider::mNbRayBVTests
protected

Number of Ray-BV tests.

Definition at line 194 of file Opcode.h.

udword Opcode::RayCollider::mNbRayPrimTests
protected

Number of Ray-Primitive tests.

Definition at line 195 of file Opcode.h.

Point Opcode::RayCollider::mOrigin
protected

Ray origin.

Definition at line 181 of file Opcode.h.

CollisionFace Opcode::RayCollider::mStabbedFace
protected

Current stabbed face.

Definition at line 186 of file Opcode.h.

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: