Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Opcode::PlanesCollider Class Reference

#include <Opcode.h>

Inheritance diagram for Opcode::PlanesCollider:
Inheritance graph
[legend]

Public Member Functions

bool Collide (PlanesCache &cache, const Plane *planes, udword nb_planes, const Model &model, const Matrix4x4 *worldm=null)
 
inline_ bool Collide (PlanesCache &cache, const OBB &box, const Model &model, const Matrix4x4 *worldb=null, const Matrix4x4 *worldm=null)
 
 override (Collider) const char *ValidateSettings()
 
 PlanesCollider ()
 
void setCollisionPairInserter (hrp::CollisionPairInserterBase *collisionPairInserter)
 
virtual ~PlanesCollider ()
 
- Public Member Functions inherited from Opcode::VolumeCollider
inline_ udword GetNbTouchedPrimitives () const
 
inline_ udword GetNbVolumeBVTests () const
 
inline_ udword GetNbVolumePrimTests () const
 
inline_ const udwordGetTouchedPrimitives () const
 
 override (Collider) const char *ValidateSettings()
 
 VolumeCollider ()
 
virtual ~VolumeCollider ()=0
 
- Public Member Functions inherited from Opcode::Collider
 Collider ()
 
inline_ BOOL ContactFound () const
 
inline_ BOOL FirstContactEnabled () const
 
inline_ BOOL GetContactStatus () const
 
inline_ void SetFirstContact (bool flag)
 
inline_ void SetPrimitiveTests (bool flag)
 
inline_ void SetTemporalCoherence (bool flag)
 
inline_ BOOL SkipPrimitiveTests () const
 
inline_ BOOL TemporalCoherenceEnabled () const
 
inline_ BOOL TemporalHit () const
 
virtual const char * ValidateSettings ()=0
 
virtual ~Collider ()
 

Protected Member Functions

void _Collide (const AABBCollisionNode *node, udword clip_mask)
 
void _Collide (const AABBNoLeafNode *node, udword clip_mask)
 
void _Collide (const AABBQuantizedNode *node, udword clip_mask)
 
void _Collide (const AABBQuantizedNoLeafNode *node, udword clip_mask)
 
void _CollideNoPrimitiveTest (const AABBCollisionNode *node, udword clip_mask)
 
void _CollideNoPrimitiveTest (const AABBNoLeafNode *node, udword clip_mask)
 
void _CollideNoPrimitiveTest (const AABBQuantizedNode *node, udword clip_mask)
 
void _CollideNoPrimitiveTest (const AABBQuantizedNoLeafNode *node, udword clip_mask)
 
BOOL InitQuery (PlanesCache &cache, const Plane *planes, udword nb_planes, const Matrix4x4 *worldm=null)
 
inline_ BOOL PlanesAABBOverlap (const Point &center, const Point &extents, udword &out_clip_mask, udword in_clip_mask)
 
inline_ BOOL PlanesTriOverlap (udword in_clip_mask)
 
- Protected Member Functions inherited from Opcode::VolumeCollider
void _Dump (const AABBCollisionNode *node)
 
void _Dump (const AABBNoLeafNode *node)
 
void _Dump (const AABBQuantizedNode *node)
 
void _Dump (const AABBQuantizedNoLeafNode *node)
 
inline_ BOOL IsCacheValid (VolumeCache &cache)
 
 override (Collider) inline_ void InitQuery()
 
- Protected Member Functions inherited from Opcode::Collider
virtual inline_ void InitQuery ()
 
inline_ BOOL Setup (const BaseModel *model)
 

Protected Attributes

hrp::CollisionPairInserterBasecollisionPairInserter
 
udword mNbPlanes
 
PlanemPlanes
 
VertexPointers mVP
 
- Protected Attributes inherited from Opcode::VolumeCollider
Point mCenterCoeff
 
Point mExtentsCoeff
 
udword mNbVolumeBVTests
 Number of Volume-BV tests. More...
 
udword mNbVolumePrimTests
 Number of Volume-Primitive tests. More...
 
ContainermTouchedPrimitives
 List of touched primitives. More...
 
- Protected Attributes inherited from Opcode::Collider
const BaseModelmCurrentModel
 Current model for collision query (owner of touched faces) More...
 
udword mFlags
 Bit flags. More...
 
const MeshInterfacemIMesh
 User-defined mesh interface. More...
 

Detailed Description

Definition at line 31 of file Opcode.h.

Constructor & Destructor Documentation

PlanesCollider::PlanesCollider ( )

Constructor.

Definition at line 58 of file OPC_PlanesCollider.cpp.

PlanesCollider::~PlanesCollider ( )
virtual

Destructor.

Definition at line 70 of file OPC_PlanesCollider.cpp.

Member Function Documentation

void PlanesCollider::_Collide ( const AABBCollisionNode node,
udword  clip_mask 
)
protected

Recursive collision query for normal AABB trees.

Parameters
node[in] current collision node

Definition at line 277 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_Collide ( const AABBNoLeafNode node,
udword  clip_mask 
)
protected

Recursive collision query for no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 403 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_Collide ( const AABBQuantizedNode node,
udword  clip_mask 
)
protected

Recursive collision query for quantized AABB trees.

Parameters
node[in] current collision node

Definition at line 335 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_Collide ( const AABBQuantizedNoLeafNode node,
udword  clip_mask 
)
protected

Recursive collision query for quantized no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 451 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_CollideNoPrimitiveTest ( const AABBCollisionNode node,
udword  clip_mask 
)
protected

Recursive collision query for normal AABB trees.

Parameters
node[in] current collision node

Definition at line 306 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_CollideNoPrimitiveTest ( const AABBNoLeafNode node,
udword  clip_mask 
)
protected

Recursive collision query for no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 427 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_CollideNoPrimitiveTest ( const AABBQuantizedNode node,
udword  clip_mask 
)
protected

Recursive collision query for quantized AABB trees.

Parameters
node[in] current collision node

Definition at line 369 of file OPC_PlanesCollider.cpp.

void PlanesCollider::_CollideNoPrimitiveTest ( const AABBQuantizedNoLeafNode node,
udword  clip_mask 
)
protected

Recursive collision query for quantized no-leaf AABB trees.

Parameters
node[in] current collision node

Definition at line 480 of file OPC_PlanesCollider.cpp.

bool PlanesCollider::Collide ( PlanesCache cache,
const Plane planes,
udword  nb_planes,
const Model model,
const Matrix4x4 worldm = null 
)

Generic collision query for generic OPCODE models. After the call, access the results:

Parameters
cache[in/out] a planes cache
planes[in] list of planes in world space
nb_planes[in] number of planes
model[in] Opcode model to collide with
worldm[in] model's world matrix, or null
Returns
true if success
Warning
SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.

Definition at line 104 of file OPC_PlanesCollider.cpp.

inline_ bool Opcode::PlanesCollider::Collide ( PlanesCache cache,
const OBB box,
const Model model,
const Matrix4x4 worldb = null,
const Matrix4x4 worldm = null 
)
inline

Definition at line 60 of file Opcode.h.

BOOL PlanesCollider::InitQuery ( PlanesCache cache,
const Plane planes,
udword  nb_planes,
const Matrix4x4 worldm = null 
)
protected

Initializes a collision query :

  • reset stats & contact status
  • compute planes in model space
  • check temporal coherence
Parameters
cache[in/out] a planes cache
planes[in] list of planes
nb_planes[in] number of planes
worldm[in] model's world matrix, or null
Returns
TRUE if we can return immediately
Warning
SCALE NOT SUPPORTED. The matrix must contain rotation & translation parts only.

Definition at line 178 of file OPC_PlanesCollider.cpp.

Opcode::PlanesCollider::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::PlanesCollider::PlanesAABBOverlap ( const Point center,
const Point extents,
udword out_clip_mask,
udword  in_clip_mask 
)
protected
inline_ BOOL Opcode::PlanesCollider::PlanesTriOverlap ( udword  in_clip_mask)
protected
void Opcode::PlanesCollider::setCollisionPairInserter ( hrp::CollisionPairInserterBase collisionPairInserter)
inline

Definition at line 38 of file Opcode.h.

Member Data Documentation

hrp::CollisionPairInserterBase* Opcode::PlanesCollider::collisionPairInserter
protected

Definition at line 92 of file Opcode.h.

udword Opcode::PlanesCollider::mNbPlanes
protected

Definition at line 94 of file Opcode.h.

Plane* Opcode::PlanesCollider::mPlanes
protected

Definition at line 95 of file Opcode.h.

VertexPointers Opcode::PlanesCollider::mVP
protected

Definition at line 97 of file Opcode.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:32