Macros | Functions
DistFuncs.cpp File Reference
#include "DistFuncs.h"
Include dependency graph for DistFuncs.cpp:

Go to the source code of this file.

Macros

#define EPS   1e-8
 

Functions

std::ostream & operator<< (std::ostream &ost, const Point &p)
 
bool PointFaceAppTest (const Point &P, const Point **vertices, const Point *edges, const Point &n)
 check whether a point is in Voroni region of a face More...
 
float PointPlaneDist (const Point &P, const Point &pointOnPlane, const Point &n, Point &cp)
 compute signed distance between a point and a plane More...
 
float PointSegDist (const Point &P, const Point &u0, const Point &u1)
 compute distance between a point and a line segment More...
 
float SegSegDist (const Point &u0, const Point &u, const Point &v0, const Point &v, Point &cp0, Point &cp1)
 compute the minimum distance and the closest points between two line segments More...
 
float SegSegDist (const Point &u0, const Point &u1, const Point &v0, const Point &v1)
 compute distance between line segments More...
 
float TriTriDist (const Point &U0, const Point &U1, const Point &U2, const Point &V0, const Point &V1, const Point &V2, Point &cp0, Point &cp1)
 compute the minimum distance and the closest points between two triangles More...
 

Macro Definition Documentation

◆ EPS

#define EPS   1e-8

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  ost,
const Point p 
)

Definition at line 3 of file DistFuncs.cpp.

◆ PointFaceAppTest()

bool PointFaceAppTest ( const Point P,
const Point **  vertices,
const Point edges,
const Point n 
)
inline

check whether a point is in Voroni region of a face

Parameters
pa point to be tested
verticesvertices of the triangle
edgesedges of the triangle
nnormal vector of the triangle
Returns
true if the point is in the Voronoi region, false otherwise

Definition at line 141 of file DistFuncs.cpp.

◆ PointPlaneDist()

float PointPlaneDist ( const Point P,
const Point pointOnPlane,
const Point n,
Point cp 
)
inline

compute signed distance between a point and a plane

Parameters
Pa point
pointOnPolanea point on the plane
nnormal vector of the plane
cpthe closest point on the plane from P

Definition at line 105 of file DistFuncs.cpp.

◆ PointSegDist()

float PointSegDist ( const Point P,
const Point u0,
const Point u1 
)

compute distance between a point and a line segment

Parameters
Pthe point
u0one of end points of the line segment
u1the other end point of the line segment
Returns
distance between the point and the line segment

Definition at line 115 of file DistFuncs.cpp.

◆ SegSegDist() [1/2]

float SegSegDist ( const Point u0,
const Point u,
const Point v0,
const Point v,
Point cp0,
Point cp1 
)
inline

compute the minimum distance and the closest points between two line segments

This function is implemented referring the following webpage http://www.softsurfer.com/Archive/algorithm_0106/algorithm_0106.htm

Parameters
u0start point of the first line segment
uvector from u0 to the other end point of the first line segment
v0start point of the second line segment
vvector from v0 the other end point of the second line segment
cp0the closest point on the first line segment
cp1the closest point on the second line segment
Returns
the minimum distance

Definition at line 24 of file DistFuncs.cpp.

◆ SegSegDist() [2/2]

float SegSegDist ( const Point u0,
const Point u1,
const Point v0,
const Point v1 
)

compute distance between line segments

u0 one of end points of the first line segment

u1 the other end point of the first line segment

v0 one of end points of the second line segment

v1 the other end point of the second line segment

Returns
distance between line segments

Definition at line 271 of file DistFuncs.cpp.

◆ TriTriDist()

float TriTriDist ( const Point U0,
const Point U1,
const Point U2,
const Point V0,
const Point V1,
const Point V2,
Point cp0,
Point cp1 
)

compute the minimum distance and the closest points between two triangles

Parameters
U0the first vertex of the first triangle
U1the second vertex of the first triangle
U2the third vertex of the first triangle
V0the first vertex of the second triangle
V1the second vertex of the second triangle
V2the third vertex of the second triangle
cp0the closest point on the first triangle
cp1the closest point on the second triangle
Returns
the minimum distance

Definition at line 154 of file DistFuncs.cpp.



openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:04