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

◆ figType

Enumerator
tri 
sector 

Definition at line 108 of file ColdetModelPair.h.

◆ pointType

Enumerator
vertex 
inter 

Definition at line 107 of file ColdetModelPair.h.

Constructor & Destructor Documentation

◆ ColdetModelPair() [1/3]

ColdetModelPair::ColdetModelPair ( )

Definition at line 25 of file ColdetModelPair.cpp.

◆ ColdetModelPair() [2/3]

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

Definition at line 31 of file ColdetModelPair.cpp.

◆ ColdetModelPair() [3/3]

ColdetModelPair::ColdetModelPair ( const ColdetModelPair org)

Definition at line 40 of file ColdetModelPair.cpp.

◆ ~ColdetModelPair()

ColdetModelPair::~ColdetModelPair ( )
virtual

Definition at line 48 of file ColdetModelPair.cpp.

Member Function Documentation

◆ calculateCentroidIntersection()

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.

◆ calculateIntersection()

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.

◆ calculatePolygonArea()

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

Definition at line 834 of file ColdetModelPair.cpp.

◆ calculateSectorCentroid()

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

Definition at line 853 of file ColdetModelPair.cpp.

◆ checkCollision()

bool hrp::ColdetModelPair::checkCollision ( )
inline

Definition at line 55 of file ColdetModelPair.h.

◆ clearCollisions()

void hrp::ColdetModelPair::clearCollisions ( )
inline

Definition at line 51 of file ColdetModelPair.h.

◆ collisions()

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

Definition at line 47 of file ColdetModelPair.h.

◆ computeDistance() [1/2]

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

Definition at line 568 of file ColdetModelPair.cpp.

◆ computeDistance() [2/2]

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.

◆ detectCollisions()

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

Definition at line 43 of file ColdetModelPair.h.

◆ detectCollisionsSub()

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

Definition at line 65 of file ColdetModelPair.cpp.

◆ detectIntersection()

bool ColdetModelPair::detectIntersection ( )

Definition at line 625 of file ColdetModelPair.cpp.

◆ detectMeshMeshCollisions()

bool ColdetModelPair::detectMeshMeshCollisions ( bool  detectAllContacts)
private

Definition at line 154 of file ColdetModelPair.cpp.

◆ detectPlaneCylinderCollisions()

bool ColdetModelPair::detectPlaneCylinderCollisions ( bool  detectAllContacts)
private

Definition at line 457 of file ColdetModelPair.cpp.

◆ detectPlaneMeshCollisions()

bool ColdetModelPair::detectPlaneMeshCollisions ( bool  detectAllContacts)
private

Definition at line 100 of file ColdetModelPair.cpp.

◆ detectSphereMeshCollisions()

bool ColdetModelPair::detectSphereMeshCollisions ( bool  detectAllContacts)
private

Definition at line 249 of file ColdetModelPair.cpp.

◆ detectSphereSphereCollisions()

bool ColdetModelPair::detectSphereSphereCollisions ( bool  detectAllContacts)
private

Definition at line 191 of file ColdetModelPair.cpp.

◆ enableNormalVectorCorrection()

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

Definition at line 88 of file ColdetModelPair.h.

◆ isInsideCircle()

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

Definition at line 80 of file ColdetModelPair.h.

◆ isInsideTriangle()

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.

◆ makeCCW()

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

Definition at line 819 of file ColdetModelPair.cpp.

◆ model()

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

Definition at line 40 of file ColdetModelPair.h.

◆ operator=()

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

Definition at line 971 of file ColdetModelPair.cpp.

◆ set()

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

Definition at line 54 of file ColdetModelPair.cpp.

◆ setCollisionPairInserter()

void ColdetModelPair::setCollisionPairInserter ( CollisionPairInserterBase inserter)

Definition at line 643 of file ColdetModelPair.cpp.

◆ tolerance()

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

Definition at line 69 of file ColdetModelPair.h.

◆ transform()

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

Definition at line 41 of file ColdetModelPair.h.

Member Data Documentation

◆ boxTestsCount

int hrp::ColdetModelPair::boxTestsCount
private

Definition at line 104 of file ColdetModelPair.h.

◆ collisionPairInserter

CollisionPairInserterBase* hrp::ColdetModelPair::collisionPairInserter
private

Definition at line 102 of file ColdetModelPair.h.

◆ models

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

Definition at line 99 of file ColdetModelPair.h.

◆ tolerance_

double hrp::ColdetModelPair::tolerance_
private

Definition at line 100 of file ColdetModelPair.h.

◆ triTestsCount

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 Thu Sep 8 2022 02:24:08