KrisLibrary
1.0.0
|
A contact point with custom force / wrench constraints. More...
#include <Contact.h>
Public Member Functions | |
CustomContactPoint (const ContactPoint &cp, int numFCEdges=4) | |
void | set (const ContactPoint &cp, int numFCEdges=4) |
Copies from a ContactPoint, and uses a polyhedral friction cone approximation. | |
void | setRobustnessFactor (Real offset) |
Offsets the friction cone by the given offset. | |
void | addNormalForceBounds (Real minimum, Real maximum) |
Bounds the minimum / maximum normal force. | |
void | calculateForceMatrix (int numFCEdges=4) |
Re-calculates the force matrix from the values of x, n, kFriction. | |
void | calculateWrenchMatrix (int numFCEdges=4) |
int | numForceVariables () const |
int | numConstraints () const |
Returns the number of constraints. | |
Public Attributes | |
Vector3 | x |
Vector3 | n |
Real | kFriction |
Matrix | forceMatrix |
Vector | forceOffset |
Matrix | wrenchMatrix |
Vector | wrenchOffset |
A contact point with custom force / wrench constraints.
Custom constraints are in the form A*f <= b for forces or A*w <= b for wrenches.
void CustomContactPoint::calculateWrenchMatrix | ( | int | numFCEdges = 4 | ) |
Re-calculates the wrench matrix from the values of x, n, kFriction OR the force matrix if it exists
References Math3D::Matrix3::setCrossProduct().
int CustomContactPoint::numForceVariables | ( | ) | const |
Returns the number of force degrees of freedom: 1 means frictionless, 3 means frictional contact, 6 means wrench