Public Member Functions | Protected Member Functions | Protected Attributes
Opcode::SphereCollider Class Reference

#include <Opcode.h>

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

List of all members.

Public Member Functions

bool Collide (SphereCache &cache, const Sphere &sphere, const Model &model, const Matrix4x4 *worlds=null, const Matrix4x4 *worldm=null)
bool Collide (SphereCache &cache, const Sphere &sphere, const AABBTree *tree)
 SphereCollider ()
virtual ~SphereCollider ()

Protected Member Functions

void _Collide (const AABBCollisionNode *node)
void _Collide (const AABBNoLeafNode *node)
void _Collide (const AABBQuantizedNode *node)
void _Collide (const AABBQuantizedNoLeafNode *node)
void _Collide (const AABBTreeNode *node)
void _CollideNoPrimitiveTest (const AABBCollisionNode *node)
void _CollideNoPrimitiveTest (const AABBNoLeafNode *node)
void _CollideNoPrimitiveTest (const AABBQuantizedNode *node)
void _CollideNoPrimitiveTest (const AABBQuantizedNoLeafNode *node)
BOOL InitQuery (SphereCache &cache, const Sphere &sphere, const Matrix4x4 *worlds=null, const Matrix4x4 *worldm=null)
inline_ BOOL SphereAABBOverlap (const Point &center, const Point &extents)
inline_ BOOL SphereContainsBox (const Point &bc, const Point &be)
BOOL SphereTriOverlap (const Point &vert0, const Point &vert1, const Point &vert2)

Protected Attributes

Point mCenter
 Sphere center.
float mRadius2
 Sphere radius squared.

Detailed Description

Definition at line 36 of file Opcode.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 63 of file OPC_SphereCollider.cpp.

Destructor.

Definition at line 74 of file OPC_SphereCollider.cpp.


Member Function Documentation

Recursive collision query for normal AABB trees.

Parameters:
node[in] current collision node

Definition at line 343 of file OPC_SphereCollider.cpp.

Recursive collision query for no-leaf AABB trees.

Parameters:
node[in] current collision node

Definition at line 461 of file OPC_SphereCollider.cpp.

Recursive collision query for quantized AABB trees.

Parameters:
node[in] current collision node

Definition at line 397 of file OPC_SphereCollider.cpp.

Recursive collision query for quantized no-leaf AABB trees.

Parameters:
node[in] current collision node

Definition at line 505 of file OPC_SphereCollider.cpp.

Recursive collision query for vanilla AABB trees.

Parameters:
node[in] current collision node

Definition at line 559 of file OPC_SphereCollider.cpp.

Recursive collision query for normal AABB trees, without primitive tests.

Parameters:
node[in] current collision node

Definition at line 370 of file OPC_SphereCollider.cpp.

Recursive collision query for no-leaf AABB trees, without primitive tests.

Parameters:
node[in] current collision node

Definition at line 483 of file OPC_SphereCollider.cpp.

Recursive collision query for quantized AABB trees, without primitive tests.

Parameters:
node[in] current collision node

Definition at line 429 of file OPC_SphereCollider.cpp.

Recursive collision query for quantized no-leaf AABB trees, without primitive tests.

Parameters:
node[in] current collision node

Definition at line 532 of file OPC_SphereCollider.cpp.

bool SphereCollider::Collide ( SphereCache cache,
const Sphere sphere,
const Model model,
const Matrix4x4 worlds = null,
const Matrix4x4 worldm = null 
)

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

Parameters:
cache[in/out] a sphere cache
sphere[in] collision sphere in local space
model[in] Opcode model to collide with
worlds[in] sphere's world matrix, or null
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 94 of file OPC_SphereCollider.cpp.

bool SphereCollider::Collide ( SphereCache cache,
const Sphere sphere,
const AABBTree tree 
)

Collision query for vanilla AABB trees.

Parameters:
cache[in/out] a sphere cache
sphere[in] collision sphere in world space
tree[in] AABB tree
Returns:
true if success

Definition at line 284 of file OPC_SphereCollider.cpp.

BOOL SphereCollider::InitQuery ( SphereCache cache,
const Sphere sphere,
const Matrix4x4 worlds = null,
const Matrix4x4 worldm = null 
) [protected]

Initializes a collision query :

  • reset stats & contact status
  • setup matrices
  • check temporal coherence
Parameters:
cache[in/out] a sphere cache
sphere[in] sphere in local space
worlds[in] sphere's world matrix, or null
worldm[in] model's world matrix, or null
Returns:
TRUE if we can return immediately
Warning:
SCALE NOT SUPPORTED. The matrices must contain rotation & translation parts only.

Definition at line 166 of file OPC_SphereCollider.cpp.

inline_ BOOL Opcode::SphereCollider::SphereAABBOverlap ( const Point center,
const Point extents 
) [protected]

Checks the sphere completely contains the box. In which case we can end the query sooner.

Parameters:
bc[in] box center
be[in] box extents
Returns:
true if the sphere contains the whole box

Definition at line 311 of file OPC_SphereCollider.cpp.

BOOL Opcode::SphereCollider::SphereTriOverlap ( const Point vert0,
const Point vert1,
const Point vert2 
) [protected]

Member Data Documentation

Sphere center.

Definition at line 65 of file Opcode.h.

Sphere radius squared.

Definition at line 66 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 Thu Apr 11 2019 03:30:22