Optional
equationCurrent equations in the solver.
Number of solver iterations that are used to approximate normal forces used for friction (F_friction = mu * F_normal). These friction forces will override any other friction forces that are set. If you set frictionIterations = 0, then this feature will be disabled.
Use only frictionIterations > 0 if the approximated normal force (F_normal = mass * gravity) is not good enough. Examples of where it can happen is in space games where gravity is zero, or in tall stacks where the normal force is large at bottom but small at top.
0
The max number of iterations to do when solving. More gives better results, but is more expensive.
The error tolerance, per constraint. If the total error is below this limit, the solver will stop iterating. Set to zero for as good solution as possible, but to something larger than zero to make computations faster.
1e-7
The type of solver.
The number of iterations that were made during the last solve. If .tolerance is zero, this value will always be equal to .iterations, but if .tolerance is larger than zero, and the solver can quit early, then this number will be somewhere between 1 and .iterations.
Static
GSGauss-Seidel solver.
Add an equation to be solved.
Add equations. Same as .addEquation, but this time the argument is an array of Equations
Removes an equation
Method to be implemented in each subclass
Iterative Gauss-Seidel constraint equation solver.