Klamp't
0.8.1
|
A (planar) face contact feature. More...
#include <ContactFeature.h>
Public Member Functions | |
virtual Type | GetType () const |
void | GetPlane (Plane3D &p) const |
normal is set to be pointing in the outward direction | |
void | GetCentroid (Vector3 &p) const |
void | GetHold (const Vector3 &x, const Vector3 &n, Real theta, Hold &) const |
Makes the hold that matches cp[0] to x. More... | |
void | GetHold (const Vector3 &localPos, const Vector3 &x, const Vector3 &n, Real theta, Hold &) const |
Same as above, but matches localPos to x. | |
Additional Inherited Members | |
Public Types inherited from ContactFeatureBase | |
enum | Type { Point, Edge, Face, MultipleFaces, Wheel } |
Public Attributes inherited from ContactFeatureBase | |
int | link |
string | name |
Real | weight |
weight for picking this feature | |
A (planar) face contact feature.
Polygon is assumed to be planar and counter-clockwise oriented around the normal direction (e.g. if the face faces up, the vertices are CCW looking downward)
void FaceContactFeature::GetHold | ( | const Vector3 & | x, |
const Vector3 & | n, | ||
Real | theta, | ||
Hold & | |||
) | const |
Makes the hold that matches cp[0] to x.
First orients the feature's plane to match up against the normal n. Then, rotates the feature by angle theta around the normal.
Normals are set to n, friction is set to 0.