public interface ContactForceBehavior
Modifier and Type | Method and Description |
---|---|
void |
computeResponse(double[] fres,
double dist,
ContactPoint cpnt1,
ContactPoint cpnt2,
Vector3d normal,
PenetrationRegion region)
Computes the force response for a given contact.
|
void computeResponse(double[] fres, double dist, ContactPoint cpnt1, ContactPoint cpnt2, Vector3d normal, PenetrationRegion region)
fres
. The force is defined as the restoring
force
force = f(dist)computed in response to the interpenetration distance
dist
.
Note that in general, dist
will be negative, and a
negative force will be expected in response. The compliance is the
reciprocal of the derivative of f(dist)
evaluated at
dist
. The damping is a positive damping parameter used to
generate damping forces in response to motion in the contact direction.
Other information the can be used includes the two contact points associated the contact, and the contact normal, which is facing outward from the contact surface.
fres
- returns the force, compliance and damping for a given
contact distance.dist
- contact interpenetration distance. This value is usually
negative, with greater negativity indicating greater interpenetration.cpnt1
- first contact pointcpnt2
- second contact pointnormal
- contact normal, facing outward from the surfaceregion
- penetration region on the mesh associated with the
first contact point, if available