Choreonoid  1.8
Public Member Functions | Static Public Member Functions | List of all members
cnoid::ColdetModelPair Class Reference

#include <ColdetModelPair.h>

Inheritance diagram for cnoid::ColdetModelPair:
cnoid::Referenced

Public Member Functions

 ColdetModelPair ()
 
 ColdetModelPair (ColdetModel *model0, ColdetModel *model1, double tolerance=0.0)
 
 ColdetModelPair (const ColdetModelPair &org)
 
virtual ~ColdetModelPair ()
 
void set (ColdetModel *model0, ColdetModel *model1)
 
ColdetModelmodel (int index)
 
std::vector< collision_data > & detectCollisions ()
 
std::vector< collision_data > & collisions ()
 
void clearCollisions ()
 
bool checkCollision ()
 
double computeDistance (double *point0, double *point1)
 
double computeDistance (int &out_triangle0, double *out_point0, int &out_triangle1, double *out_point1)
 
bool detectIntersection ()
 
double tolerance () const
 
void setTolerance (double tolerance)
 
void setCollisionPairInserter (Opcode::CollisionPairInserter *inserter)
 
int calculateCentroidIntersection (float &cx, float &cy, float &A, float radius, std::vector< float > vx, std::vector< float > vy)
 
int makeCCW (std::vector< float > &vx, std::vector< float > &vy)
 
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 isInsideCircle (float r, float x, float y)
 
bool isInsideTriangle (float x, float y, const std::vector< float > &vx, const std::vector< float > &vy)
 
int calculateIntersection (std::vector< float > &x, std::vector< float > &y, float radius, float x1, float y1, float x2, float y2)
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Static Public Member Functions

static double computeDistance (ColdetModel *model0, ColdetModel *model1, double *point0, double *point1)
 

Additional Inherited Members

- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Constructor & Destructor Documentation

◆ ColdetModelPair() [1/3]

ColdetModelPair::ColdetModelPair ( )

◆ ColdetModelPair() [2/3]

ColdetModelPair::ColdetModelPair ( ColdetModel model0,
ColdetModel model1,
double  tolerance = 0.0 
)

◆ ColdetModelPair() [3/3]

ColdetModelPair::ColdetModelPair ( const ColdetModelPair org)

◆ ~ColdetModelPair()

ColdetModelPair::~ColdetModelPair ( )
virtual

Member Function Documentation

◆ calculateCentroidIntersection()

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

◆ calculateIntersection()

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

◆ calculatePolygonArea()

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

◆ calculateSectorCentroid()

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

◆ checkCollision()

bool cnoid::ColdetModelPair::checkCollision ( )
inline

◆ clearCollisions()

void cnoid::ColdetModelPair::clearCollisions ( )
inline

◆ collisions()

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

◆ computeDistance() [1/3]

double ColdetModelPair::computeDistance ( ColdetModel model0,
ColdetModel model1,
double *  point0,
double *  point1 
)
static

◆ computeDistance() [2/3]

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

◆ computeDistance() [3/3]

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

◆ detectCollisions()

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

◆ detectIntersection()

bool ColdetModelPair::detectIntersection ( )

◆ isInsideCircle()

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

◆ isInsideTriangle()

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

◆ makeCCW()

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

◆ model()

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

◆ set()

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

◆ setCollisionPairInserter()

void ColdetModelPair::setCollisionPairInserter ( Opcode::CollisionPairInserter *  inserter)

◆ setTolerance()

void cnoid::ColdetModelPair::setTolerance ( double  tolerance)
inline

◆ tolerance()

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

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