Public Member Functions | Public Attributes | List of all members
hrp::CollisionPairInserterBase Class Referenceabstract

#include <CollisionPairInserterBase.h>

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

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 More...
 
void clear ()
 clear collision information More...
 
 CollisionPairInserterBase ()
 
std::vector< collision_data > & collisions ()
 get collision information More...
 
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 More...
 
void set (ColdetModelSharedDataSet *model0, ColdetModelSharedDataSet *model1)
 
virtual ~CollisionPairInserterBase ()
 

Public Attributes

Matrix33 CD_Rot1
 rotation of the first mesh More...
 
Matrix33 CD_Rot2
 rotation of the second mesh More...
 
double CD_s1
 scale of the first mesh More...
 
double CD_s2
 scale of the second mesh More...
 
Vector3 CD_Trans1
 translation of the first mesh More...
 
Vector3 CD_Trans2
 translation of the second mesh More...
 
std::vector< collision_datacdContact
 collision information More...
 
ColdetModelSharedDataSetmodels [2]
 
bool normalVectorCorrection
 flag to enable/disable normal vector correction More...
 

Detailed Description

Definition at line 27 of file CollisionPairInserterBase.h.

Constructor & Destructor Documentation

hrp::CollisionPairInserterBase::CollisionPairInserterBase ( )
inline

Definition at line 30 of file CollisionPairInserterBase.h.

virtual hrp::CollisionPairInserterBase::~CollisionPairInserterBase ( )
inlinevirtual

Definition at line 31 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.

void hrp::CollisionPairInserterBase::clear ( void  )
inline

clear collision information

Definition at line 35 of file CollisionPairInserterBase.h.

std::vector<collision_data>& hrp::CollisionPairInserterBase::collisions ( )
inline

get collision information

Returns
collision information

Definition at line 95 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.

void hrp::CollisionPairInserterBase::set ( ColdetModelSharedDataSet model0,
ColdetModelSharedDataSet model1 
)
inline

Definition at line 99 of file CollisionPairInserterBase.h.

Member Data Documentation

Matrix33 hrp::CollisionPairInserterBase::CD_Rot1

rotation of the first mesh

Definition at line 105 of file CollisionPairInserterBase.h.

Matrix33 hrp::CollisionPairInserterBase::CD_Rot2

rotation of the second mesh

Definition at line 109 of file CollisionPairInserterBase.h.

double hrp::CollisionPairInserterBase::CD_s1

scale of the first mesh

Definition at line 107 of file CollisionPairInserterBase.h.

double hrp::CollisionPairInserterBase::CD_s2

scale of the second mesh

Definition at line 111 of file CollisionPairInserterBase.h.

Vector3 hrp::CollisionPairInserterBase::CD_Trans1

translation of the first mesh

Definition at line 106 of file CollisionPairInserterBase.h.

Vector3 hrp::CollisionPairInserterBase::CD_Trans2

translation of the second mesh

Definition at line 110 of file CollisionPairInserterBase.h.

std::vector<collision_data> hrp::CollisionPairInserterBase::cdContact

collision information

Definition at line 113 of file CollisionPairInserterBase.h.

ColdetModelSharedDataSet* hrp::CollisionPairInserterBase::models[2]

Definition at line 115 of file CollisionPairInserterBase.h.

bool hrp::CollisionPairInserterBase::normalVectorCorrection

flag to enable/disable normal vector correction

Definition at line 118 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 Sat May 8 2021 02:42:45