libmove3d
3.13.0
|
#include <gpContact.h>
Public Member Functions | |
gpContact () | |
Default constructor of the class gpContact. | |
gpContact (const gpContact &contact) | |
gpContact & | operator= (const gpContact &contact) |
Copy operator of the class gpContact. | |
int | draw (double cone_length, int cone_nb_slices=10) |
int | computeBarycentricCoordinates () |
int | computeCurvature () |
double | distanceToSharpEdge (double angleThreshold) |
Public Attributes | |
unsigned int | ID |
p3d_polyhedre * | surface |
unsigned int | face |
unsigned int | fingerID |
p3d_vector3 | position |
p3d_vector3 | normal |
p3d_vector3 | forceDirection |
double | mu |
p3d_vector3 | baryCoords |
double | curvature |
double | score |
This class is used to describe the characteristics of the contact points of a grasp. It is also used to describe the contact points of an object pose (class gpPose).
int gpContact::computeBarycentricCoordinates | ( | ) |
Computes the barycentric coordinates of the contact. The barycentric coordinates are defined by the vertices of the triangle the contact belongs to. If the triangle points are p1, p2 and p3 and the contact is p, we have: p= a1*p1 + a2* p2 + a3*p3;
int gpContact::computeCurvature | ( | ) |
Computes the curvature at the contact. The computation is based on the barycentric coordinates of the contact and the curvature at the mesh vertices (computed outside Move3D).
double gpContact::distanceToSharpEdge | ( | double | angleThreshold | ) |
Computes the distance from the contact to a sharp edge. The function considers the edges of the face the contact is on. If one of the edge is not too "flat", the distance from the contact to the edge is computed and returned
angleThreshold | the edge angle (in radians) above which an edge is regarded as not flat |
int gpContact::draw | ( | double | length, |
int | nb_slices = 10 |
||
) |
Draws a contact (position and friction cone).
length | lenght of the friction cone to draw |
nb_slices | number of segments of the cone discretization |
p3d_vector3 gpContact::baryCoords |
barycentric coordinates (defined by the vertices of the triangle) of the contact
double gpContact::curvature |
curvature of the object surface at the contact point
unsigned int gpContact::face |
index of the face (that must be a triangle), in the structure p3d_polyhedre, where the contact is located (starts from 0)
unsigned int gpContact::fingerID |
ID (starting from 1) of the finger that realizes the contact (finger 1, finger 2, etc.)
p3d_vector3 gpContact::forceDirection |
direction of the force exerted by the finger
unsigned int gpContact::ID |
ID of the contact
double gpContact::mu |
friction coefficient of the contact
p3d_vector3 gpContact::normal |
surface normal at the contact point (directed outside the object)
p3d_vector3 gpContact::position |
contact position given in the object's frame
double gpContact::score |
a score that can be used for any ordering need
p3d_polyhedre* gpContact::surface |
surface (object) of the contact