#include <StdCollisionPairInserter.h>
|
| | StdCollisionPairInserter () |
| |
| virtual | ~StdCollisionPairInserter () |
| |
| 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) |
| | 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) |
| | refine collision information using neighboring triangls More...
|
| |
| virtual | ~CollisionPairInserter () |
| |
| void | clear () |
| | clear collision information More...
|
| |
| std::vector< cnoid::collision_data > & | collisions () |
| | get collision information More...
|
| |
| void | set (cnoid::ColdetModelInternalModel *model0, cnoid::ColdetModelInternalModel *model1) |
| |
◆ StdCollisionPairInserter()
| StdCollisionPairInserter::StdCollisionPairInserter |
( |
| ) |
|
◆ ~StdCollisionPairInserter()
| StdCollisionPairInserter::~StdCollisionPairInserter |
( |
| ) |
|
|
virtual |
◆ apply()
| int StdCollisionPairInserter::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 |
|
) |
| |
|
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
Implements Opcode::CollisionPairInserter.
◆ detectTriTriOverlap()
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
Implements Opcode::CollisionPairInserter.
The documentation for this class was generated from the following files: