Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
hrp::ColdetModelPair Class Reference

#include <ColdetModelPair.h>

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

List of all members.

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 ()
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)
void set (ColdetModelPtr model0, ColdetModelPtr model1)
void setCollisionPairInserter (CollisionPairInserterBase *inserter)
double tolerance () const
IceMaths::Matrix4x4transform (int index)
virtual ~ColdetModelPair ()

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

Detailed Description

Definition at line 29 of file ColdetModelPair.h.


Member Enumeration Documentation

Enumerator:
tri 
sector 

Definition at line 104 of file ColdetModelPair.h.

Enumerator:
vertex 
inter 

Definition at line 103 of file ColdetModelPair.h.


Constructor & Destructor Documentation

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.

Definition at line 40 of file ColdetModelPair.cpp.

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.

Definition at line 55 of file ColdetModelPair.h.

Definition at line 51 of file ColdetModelPair.h.

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.

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.

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.

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.

Definition at line 40 of file ColdetModelPair.h.

Definition at line 54 of file ColdetModelPair.cpp.

Definition at line 643 of file ColdetModelPair.cpp.

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

Definition at line 69 of file ColdetModelPair.h.

Definition at line 41 of file ColdetModelPair.h.


Member Data Documentation

Definition at line 100 of file ColdetModelPair.h.

Definition at line 98 of file ColdetModelPair.h.

Definition at line 95 of file ColdetModelPair.h.

Definition at line 96 of file ColdetModelPair.h.

Definition at line 101 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 Sun Apr 2 2017 03:44:01