Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
hrp::ColdetModelPair Class Reference

#include <ColdetModelPair.h>

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

Classes

struct  figStruct
 
struct  pointStruct
 

Public Member Functions

int calculateCentroidIntersection (float &cx, float &cy, float &A, float radius, std::vector< float > vx, std::vector< float > vy)
 
int calculateIntersection (std::vector< float > &x, std::vector< float > &y, float radius, float x1, float y1, float x2, float y2)
 
float calculatePolygonArea (const std::vector< float > &vx, const std::vector< float > &vy)
 
void calculateSectorCentroid (float &cx, float &cy, float radius, float th1, float th2)
 
bool checkCollision ()
 
void clearCollisions ()
 
 ColdetModelPair ()
 
 ColdetModelPair (ColdetModelPtr model0, ColdetModelPtr model1, double tolerance=0)
 
 ColdetModelPair (const ColdetModelPair &org)
 
std::vector< collision_data > & collisions ()
 
double computeDistance (double *point0, double *point1)
 
double computeDistance (int &out_triangle0, double *out_point0, int &out_triangle1, double *out_point1)
 
std::vector< collision_data > & detectCollisions ()
 
bool detectIntersection ()
 
void enableNormalVectorCorrection (bool flag)
 
bool isInsideCircle (float r, float x, float y)
 
bool isInsideTriangle (float x, float y, const std::vector< float > &vx, const std::vector< float > &vy)
 
int makeCCW (std::vector< float > &vx, std::vector< float > &vy)
 
ColdetModelmodel (int index)
 
ColdetModelPairoperator= (const ColdetModelPair &cmp)
 
void set (ColdetModelPtr model0, ColdetModelPtr model1)
 
void setCollisionPairInserter (CollisionPairInserterBase *inserter)
 
double tolerance () const
 
IceMaths::Matrix4x4transform (int index)
 
virtual ~ColdetModelPair ()
 
- Public Member Functions inherited from hrp::Referenced
 Referenced ()
 
virtual ~Referenced ()
 

Private Types

enum  figType { tri, sector }
 
enum  pointType { vertex, inter }
 

Private Member Functions

std::vector< collision_data > & detectCollisionsSub (bool detectAllContacts)
 
bool detectMeshMeshCollisions (bool detectAllContacts)
 
bool detectPlaneCylinderCollisions (bool detectAllContacts)
 
bool detectPlaneMeshCollisions (bool detectAllContacts)
 
bool detectSphereMeshCollisions (bool detectAllContacts)
 
bool detectSphereSphereCollisions (bool detectAllContacts)
 

Private Attributes

int boxTestsCount
 
CollisionPairInserterBasecollisionPairInserter
 
ColdetModelPtr models [2]
 
double tolerance_
 
int triTestsCount
 

Additional Inherited Members

- Protected Member Functions inherited from hrp::Referenced
int refCounter ()
 

Detailed Description

Definition at line 29 of file ColdetModelPair.h.

Member Enumeration Documentation

Enumerator
tri 
sector 

Definition at line 108 of file ColdetModelPair.h.

Enumerator
vertex 
inter 

Definition at line 107 of file ColdetModelPair.h.

Constructor & Destructor Documentation

ColdetModelPair::ColdetModelPair ( )

Definition at line 25 of file ColdetModelPair.cpp.

ColdetModelPair::ColdetModelPair ( ColdetModelPtr  model0,
ColdetModelPtr  model1,
double  tolerance = 0 
)

Definition at line 31 of file ColdetModelPair.cpp.

ColdetModelPair::ColdetModelPair ( const ColdetModelPair org)

Definition at line 40 of file ColdetModelPair.cpp.

ColdetModelPair::~ColdetModelPair ( )
virtual

Definition at line 48 of file ColdetModelPair.cpp.

Member Function Documentation

int ColdetModelPair::calculateCentroidIntersection ( float &  cx,
float &  cy,
float &  A,
float  radius,
std::vector< float >  vx,
std::vector< float >  vy 
)

Definition at line 652 of file ColdetModelPair.cpp.

int ColdetModelPair::calculateIntersection ( std::vector< float > &  x,
std::vector< float > &  y,
float  radius,
float  x1,
float  y1,
float  x2,
float  y2 
)

Definition at line 896 of file ColdetModelPair.cpp.

float ColdetModelPair::calculatePolygonArea ( const std::vector< float > &  vx,
const std::vector< float > &  vy 
)

Definition at line 834 of file ColdetModelPair.cpp.

void ColdetModelPair::calculateSectorCentroid ( float &  cx,
float &  cy,
float  radius,
float  th1,
float  th2 
)

Definition at line 853 of file ColdetModelPair.cpp.

bool hrp::ColdetModelPair::checkCollision ( )
inline

Definition at line 55 of file ColdetModelPair.h.

void hrp::ColdetModelPair::clearCollisions ( )
inline

Definition at line 51 of file ColdetModelPair.h.

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

Definition at line 47 of file ColdetModelPair.h.

double ColdetModelPair::computeDistance ( double *  point0,
double *  point1 
)

Definition at line 568 of file ColdetModelPair.cpp.

double ColdetModelPair::computeDistance ( int out_triangle0,
double *  out_point0,
int out_triangle1,
double *  out_point1 
)
Parameters
out_triangle0,out_triangle1Indices of the triangle pair that are originally registered by ColdeModel::setTraiangle().
out_point0,out_point1The closest points

Definition at line 595 of file ColdetModelPair.cpp.

std::vector<collision_data>& hrp::ColdetModelPair::detectCollisions ( )
inline

Definition at line 43 of file ColdetModelPair.h.

std::vector< collision_data > & ColdetModelPair::detectCollisionsSub ( bool  detectAllContacts)
private

Definition at line 65 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectIntersection ( )

Definition at line 625 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectMeshMeshCollisions ( bool  detectAllContacts)
private

Definition at line 154 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectPlaneCylinderCollisions ( bool  detectAllContacts)
private

Definition at line 457 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectPlaneMeshCollisions ( bool  detectAllContacts)
private

Definition at line 100 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectSphereMeshCollisions ( bool  detectAllContacts)
private

Definition at line 249 of file ColdetModelPair.cpp.

bool ColdetModelPair::detectSphereSphereCollisions ( bool  detectAllContacts)
private

Definition at line 191 of file ColdetModelPair.cpp.

void hrp::ColdetModelPair::enableNormalVectorCorrection ( bool  flag)
inline

Definition at line 88 of file ColdetModelPair.h.

bool hrp::ColdetModelPair::isInsideCircle ( float  r,
float  x,
float  y 
)
inline

Definition at line 80 of file ColdetModelPair.h.

bool ColdetModelPair::isInsideTriangle ( float  x,
float  y,
const std::vector< float > &  vx,
const std::vector< float > &  vy 
)

Definition at line 871 of file ColdetModelPair.cpp.

int ColdetModelPair::makeCCW ( std::vector< float > &  vx,
std::vector< float > &  vy 
)

Definition at line 819 of file ColdetModelPair.cpp.

ColdetModel* hrp::ColdetModelPair::model ( int  index)
inline

Definition at line 40 of file ColdetModelPair.h.

ColdetModelPair & ColdetModelPair::operator= ( const ColdetModelPair cmp)

Definition at line 971 of file ColdetModelPair.cpp.

void ColdetModelPair::set ( ColdetModelPtr  model0,
ColdetModelPtr  model1 
)

Definition at line 54 of file ColdetModelPair.cpp.

void ColdetModelPair::setCollisionPairInserter ( CollisionPairInserterBase inserter)

Definition at line 643 of file ColdetModelPair.cpp.

double hrp::ColdetModelPair::tolerance ( ) const
inline

Definition at line 69 of file ColdetModelPair.h.

IceMaths::Matrix4x4* hrp::ColdetModelPair::transform ( int  index)
inline

Definition at line 41 of file ColdetModelPair.h.

Member Data Documentation

int hrp::ColdetModelPair::boxTestsCount
private

Definition at line 104 of file ColdetModelPair.h.

CollisionPairInserterBase* hrp::ColdetModelPair::collisionPairInserter
private

Definition at line 102 of file ColdetModelPair.h.

ColdetModelPtr hrp::ColdetModelPair::models[2]
private

Definition at line 99 of file ColdetModelPair.h.

double hrp::ColdetModelPair::tolerance_
private

Definition at line 100 of file ColdetModelPair.h.

int hrp::ColdetModelPair::triTestsCount
private

Definition at line 105 of file ColdetModelPair.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:31