Public Member Functions | Public Attributes
hrp::CollisionPairInserterBase Class Reference

#include <CollisionPairInserterBase.h>

Inheritance diagram for hrp::CollisionPairInserterBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int apply (const Opcode::AABBCollisionNode *b1, const Opcode::AABBCollisionNode *b2, int id1, int id2, int num_of_i_points, Vector3 i_points[4], Vector3 &n_vector, double depth, Vector3 &n1, Vector3 &m1, int ctype, Opcode::MeshInterface *mesh1, Opcode::MeshInterface *mesh2)=0
 refine collision information using neighboring triangls
void clear ()
 clear collision information
std::vector< collision_data > & collisions ()
 get collision information
virtual int detectTriTriOverlap (const Vector3 &P1, const Vector3 &P2, const Vector3 &P3, const Vector3 &Q1, const Vector3 &Q2, const Vector3 &Q3, collision_data *col_p)=0
 detect collsiion between triangles
void set (ColdetModelSharedDataSet *model0, ColdetModelSharedDataSet *model1)
virtual ~CollisionPairInserterBase ()

Public Attributes

Matrix33 CD_Rot1
 rotation of the first mesh
Matrix33 CD_Rot2
 rotation of the second mesh
double CD_s1
 scale of the first mesh
double CD_s2
 scale of the second mesh
Vector3 CD_Trans1
 translation of the first mesh
Vector3 CD_Trans2
 translation of the second mesh
std::vector< collision_datacdContact
 collision information
ColdetModelSharedDataSetmodels [2]

Detailed Description

Definition at line 27 of file CollisionPairInserterBase.h.


Constructor & Destructor Documentation

Definition at line 30 of file CollisionPairInserterBase.h.


Member Function Documentation

virtual int hrp::CollisionPairInserterBase::apply ( const Opcode::AABBCollisionNode b1,
const Opcode::AABBCollisionNode b2,
int  id1,
int  id2,
int  num_of_i_points,
Vector3  i_points[4],
Vector3 n_vector,
double  depth,
Vector3 n1,
Vector3 m1,
int  ctype,
Opcode::MeshInterface mesh1,
Opcode::MeshInterface mesh2 
) [pure virtual]

refine collision information using neighboring triangls

Parameters:
b1node of the first colliding triangle
b2node of the second colliding triangle
id1id of the first colliding triangle
id2id of the second colliding triangle
num_of_i_pointsthe number of intersecting points
i_pointsintersecting points
n_vectornormal vector of collision
depthpenetration depth
n1normal vector of the first triangle
m1normal vector of the second triangle
ctypecollision type
mesh1mesh which includes the first triangle
mesh2mesh which includes the second triangle
Returns:
CD_OK if refined successfully
Note:
collision information is expressed in the second mesh coordinates

Implemented in hrp::CollisionPairInserter.

clear collision information

Definition at line 34 of file CollisionPairInserterBase.h.

get collision information

Returns:
collision information

Definition at line 94 of file CollisionPairInserterBase.h.

virtual int hrp::CollisionPairInserterBase::detectTriTriOverlap ( const Vector3 P1,
const Vector3 P2,
const Vector3 P3,
const Vector3 Q1,
const Vector3 Q2,
const Vector3 Q3,
collision_data col_p 
) [pure virtual]

detect collsiion between triangles

Parameters:
P1the first vertex of the first triangle
P2the second vertex of the first triangle
P3the third vertex of the first triangle
Q1the first vertex of the second triangle
Q2the second vertex of the second triangle
Q3the third vertex of the second triangle
col_pcollision information
Returns:
1 if collision is detected, 0 otherwise
Note:
all vertices must be represented in the same coordinates

Implemented in hrp::CollisionPairInserter.

Definition at line 98 of file CollisionPairInserterBase.h.


Member Data Documentation

rotation of the first mesh

Definition at line 104 of file CollisionPairInserterBase.h.

rotation of the second mesh

Definition at line 108 of file CollisionPairInserterBase.h.

scale of the first mesh

Definition at line 106 of file CollisionPairInserterBase.h.

scale of the second mesh

Definition at line 110 of file CollisionPairInserterBase.h.

translation of the first mesh

Definition at line 105 of file CollisionPairInserterBase.h.

translation of the second mesh

Definition at line 109 of file CollisionPairInserterBase.h.

collision information

Definition at line 112 of file CollisionPairInserterBase.h.

Definition at line 114 of file CollisionPairInserterBase.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sun Apr 2 2017 03:44:01