Package jsim.solver
Class ContactConstraint
java.lang.Object
jsim.solver.ContactConstraint
Pre-computed data for a single contact constraint, cached before the solver
iterates so that the inner loop contains only arithmetic.
A constraint represents: "prevent relative penetration along the contact normal, and resist sliding via Coulomb friction."
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ContactPointThe contact point this constraint was built for.doubleBaumgarte bias velocity for penetration correction (m/s).doubleEffective inverse mass along the contact normal (kg⁻¹).doubleVector from body A's CoM to the contact point, world frame (metres).doubleVector from body A's CoM to the contact point, world frame (metres).doubleVector from body A's CoM to the contact point, world frame (metres).doubleVector from body B's CoM to the contact point, world frame (metres).doubleVector from body B's CoM to the contact point, world frame (metres).doubleVector from body B's CoM to the contact point, world frame (metres).doubleRestitution target velocity used on the first solver iteration (m/s).doubleEffective inverse mass along the tangent direction (kg⁻¹).doubleFirst friction tangent direction, world frame (unit vector).doubleFirst friction tangent direction, world frame (unit vector).doubleFirst friction tangent direction, world frame (unit vector). -
Constructor Summary
ConstructorsConstructorDescriptionContactConstraint(ContactPoint contact) Create a constraint pre-computed from the given contact point. -
Method Summary
-
Field Details
-
contact
The contact point this constraint was built for. -
rAx
public double rAxVector from body A's CoM to the contact point, world frame (metres). -
rAy
public double rAyVector from body A's CoM to the contact point, world frame (metres). -
rAz
public double rAzVector from body A's CoM to the contact point, world frame (metres). -
rBx
public double rBxVector from body B's CoM to the contact point, world frame (metres). -
rBy
public double rByVector from body B's CoM to the contact point, world frame (metres). -
rBz
public double rBzVector from body B's CoM to the contact point, world frame (metres). -
normalEffMass
public double normalEffMassEffective inverse mass along the contact normal (kg⁻¹). -
tangX
public double tangXFirst friction tangent direction, world frame (unit vector). -
tangY
public double tangYFirst friction tangent direction, world frame (unit vector). -
tangZ
public double tangZFirst friction tangent direction, world frame (unit vector). -
tangEffMass
public double tangEffMassEffective inverse mass along the tangent direction (kg⁻¹). -
normalBias
public double normalBiasBaumgarte bias velocity for penetration correction (m/s). -
restitutionBias
public double restitutionBiasRestitution target velocity used on the first solver iteration (m/s).
-
-
Constructor Details
-
ContactConstraint
Create a constraint pre-computed from the given contact point.- Parameters:
contact- the contact point to constrain
-