API Docs for: 0.6.1
Show:

GSSolver Class

Extends Solver

Constraint equation Gauss-Seidel solver.

Constructor

GSSolver

()

Methods

addEquation

(
  • eq
)

Add an equation

Parameters:

removeAllEquations

()

Add all equations

removeEquation

(
  • eq
)

Remove an equation

Parameters:

solve

(
  • dt
  • world
)

Should be implemented in subclasses!

Parameters:

Properties

equations

Array

All equations to be solved

iterations

Number

The number of solver iterations determines quality of the constraints in the world. The more iterations, the more correct simulation. More iterations need more computations though. If you have a large gravity force in your world, you will need more iterations.

tolerance

Number

When tolerance is reached, the system is assumed to be converged.