Choreonoid  1.5
Public Member Functions | Protected Member Functions | List of all members
Opcode::SSVTreeCollider Class Reference

collision detector based on SSV(Sphere Swept Volume) More...

#include <SSVTreeCollider.h>

Inheritance diagram for Opcode::SSVTreeCollider:

Public Member Functions

 SSVTreeCollider ()
 constructor More...
 
 ~SSVTreeCollider ()
 destructor More...
 
bool Distance (BVTCache &cache, float &minD, Point &point0, Point &point1, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null)
 compute the minimum distance and the closest points More...
 
bool Collide (BVTCache &cache, double tolerance, const Matrix4x4 *world0=null, const Matrix4x4 *world1=null)
 detect collision between links. More...
 

Protected Member Functions

float SsvSsvDist (const AABBCollisionNode *b0, const AABBCollisionNode *b1)
 compute distance between SSV(Swept Sphere Volume)s More...
 
float PrimDist (udword id0, udword id1, Point &point0, Point &point1)
 compute distance between primitives(triangles) More...
 

Detailed Description

collision detector based on SSV(Sphere Swept Volume)

Constructor & Destructor Documentation

Opcode::SSVTreeCollider::SSVTreeCollider ( )

constructor

Opcode::SSVTreeCollider::~SSVTreeCollider ( )
inline

destructor

Member Function Documentation

bool Opcode::SSVTreeCollider::Collide ( BVTCache &  cache,
double  tolerance,
const Matrix4x4 *  world0 = null,
const Matrix4x4 *  world1 = null 
)

detect collision between links.

Parameters
cache
toleranceIf distance between links is smaller than this value, it is regarded as collision
world0transformation of the first link
world1transformation of the second link
Returns
true if collision is detected, false otherwise
bool Opcode::SSVTreeCollider::Distance ( BVTCache &  cache,
float &  minD,
Point &  point0,
Point &  point1,
const Matrix4x4 *  world0 = null,
const Matrix4x4 *  world1 = null 
)

compute the minimum distance and the closest points

Parameters
cache
minDthe minimum distance
point0the closest point on the first link
point1the closest point on the second link
world0transformation of the first link
world1transformation of the second link
Returns
true if computed successfully, false otherwise
float Opcode::SSVTreeCollider::PrimDist ( udword  id0,
udword  id1,
Point &  point0,
Point &  point1 
)
protected

compute distance between primitives(triangles)

Parameters
id0index of the first primitive
id1index of the second primitive
point0the closest point on the first primitive
point1the closest point on the second primitive
Returns
the minimum distance
float Opcode::SSVTreeCollider::SsvSsvDist ( const AABBCollisionNode *  b0,
const AABBCollisionNode *  b1 
)
protected

compute distance between SSV(Swept Sphere Volume)s

Parameters
b0collision node from the left tree
b1collision node from the right tree
returndistance

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