#include <CollisionPairInserter.h>
|
virtual | ~CollisionPairInserter () |
|
void | clear () |
| clear collision information More...
|
|
virtual int | detectTriTriOverlap (const cnoid::Vector3 &P1, const cnoid::Vector3 &P2, const cnoid::Vector3 &P3, const cnoid::Vector3 &Q1, const cnoid::Vector3 &Q2, const cnoid::Vector3 &Q3, cnoid::collision_data *col_p)=0 |
| detect collsiion between triangles More...
|
|
virtual int | apply (const Opcode::AABBCollisionNode *b1, const Opcode::AABBCollisionNode *b2, int id1, int id2, int num_of_i_points, cnoid::Vector3 i_points[4], cnoid::Vector3 &n_vector, double depth, cnoid::Vector3 &n1, cnoid::Vector3 &m1, int ctype, Opcode::MeshInterface *mesh1, Opcode::MeshInterface *mesh2)=0 |
| refine collision information using neighboring triangls More...
|
|
std::vector< cnoid::collision_data > & | collisions () |
| get collision information More...
|
|
void | set (cnoid::ColdetModelInternalModel *model0, cnoid::ColdetModelInternalModel *model1) |
|
virtual Opcode::CollisionPairInserter::~CollisionPairInserter |
( |
| ) |
|
|
inlinevirtual |
virtual int Opcode::CollisionPairInserter::apply |
( |
const Opcode::AABBCollisionNode * |
b1, |
|
|
const Opcode::AABBCollisionNode * |
b2, |
|
|
int |
id1, |
|
|
int |
id2, |
|
|
int |
num_of_i_points, |
|
|
cnoid::Vector3 |
i_points[4], |
|
|
cnoid::Vector3 & |
n_vector, |
|
|
double |
depth, |
|
|
cnoid::Vector3 & |
n1, |
|
|
cnoid::Vector3 & |
m1, |
|
|
int |
ctype, |
|
|
Opcode::MeshInterface * |
mesh1, |
|
|
Opcode::MeshInterface * |
mesh2 |
|
) |
| |
|
pure virtual |
refine collision information using neighboring triangls
- Parameters
-
b1 | node of the first colliding triangle |
b2 | node of the second colliding triangle |
id1 | id of the first colliding triangle |
id2 | id of the second colliding triangle |
num_of_i_points | the number of intersecting points |
i_points | intersecting points |
n_vector | normal vector of collision |
depth | penetration depth |
n1 | normal vector of the first triangle |
m1 | normal vector of the second triangle |
ctype | collision type |
mesh1 | mesh which includes the first triangle |
mesh2 | mesh which includes the second triangle |
- Returns
- CD_OK if refined successfully
- Note
- collision information is expressed in the second mesh coordinates
Implemented in Opcode::StdCollisionPairInserter.
void Opcode::CollisionPairInserter::clear |
( |
| ) |
|
|
inline |
clear collision information
get collision information
- Returns
- collision information
detect collsiion between triangles
- Parameters
-
P1 | the first vertex of the first triangle |
P2 | the second vertex of the first triangle |
P3 | the third vertex of the first triangle |
Q1 | the first vertex of the second triangle |
Q2 | the second vertex of the second triangle |
Q3 | the third vertex of the second triangle |
col_p | collision information |
- Returns
- 1 if collision is detected, 0 otherwise
- Note
- all vertices must be represented in the same coordinates
Implemented in Opcode::StdCollisionPairInserter.
rotation of the first mesh
rotation of the second mesh
double Opcode::CollisionPairInserter::CD_s1 |
double Opcode::CollisionPairInserter::CD_s2 |
translation of the first mesh
translation of the second mesh
The documentation for this class was generated from the following file: