Jolt Physics
A multi core friendly Game Physics Engine
|
Class used in other constraint parts to calculate the required bias factor in the lagrange multiplier for creating springs. More...
#include <SpringPart.h>
Public Member Functions | |
void | CalculateSpringPropertiesWithBias (float inBias) |
void | CalculateSpringPropertiesWithFrequencyAndDamping (float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inFrequency, float inDamping, float &outEffectiveMass) |
void | CalculateSpringPropertiesWithStiffnessAndDamping (float inDeltaTime, float inInvEffectiveMass, float inBias, float inC, float inStiffness, float inDamping, float &outEffectiveMass) |
bool | IsActive () const |
Returns if this spring is active. | |
float | GetBias (float inTotalLambda) const |
Get total bias b, including supplied bias and bias for spring: lambda = J v + b. | |
Class used in other constraint parts to calculate the required bias factor in the lagrange multiplier for creating springs.
Turn off the spring and set a bias only
inBias | Bias term (b) for the constraint impulse: lambda = J v + b |
|
inline |
Calculate spring properties based on frequency and damping ratio
inDeltaTime | Time step |
inInvEffectiveMass | Inverse effective mass K |
inBias | Bias term (b) for the constraint impulse: lambda = J v + b |
inC | Value of the constraint equation (C). Set to zero if you don't want to drive the constraint to zero with a spring. |
inFrequency | Oscillation frequency (Hz). Set to zero if you don't want to drive the constraint to zero with a spring. |
inDamping | Damping factor (0 = no damping, 1 = critical damping). Set to zero if you don't want to drive the constraint to zero with a spring. |
outEffectiveMass | On return, this contains the new effective mass K^-1 |
|
inline |
Calculate spring properties with spring Stiffness (k) and damping (c), this is based on the spring equation: F = -k * x - c * v
inDeltaTime | Time step |
inInvEffectiveMass | Inverse effective mass K |
inBias | Bias term (b) for the constraint impulse: lambda = J v + b |
inC | Value of the constraint equation (C). Set to zero if you don't want to drive the constraint to zero with a spring. |
inStiffness | Spring stiffness k. Set to zero if you don't want to drive the constraint to zero with a spring. |
inDamping | Spring damping coefficient c. Set to zero if you don't want to drive the constraint to zero with a spring. |
outEffectiveMass | On return, this contains the new effective mass K^-1 |
Get total bias b, including supplied bias and bias for spring: lambda = J v + b.
|
inline |
Returns if this spring is active.