Solver class

Constraint equation solver base class.

Implementers

Constructors

Solver({List<Equation>? equations, int iterations = 10, double tolerance = 1e-7})
@todo remove useless constructor

Properties

equations List<Equation>
All equations to be solved
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
iterations int
The number of solver iterations determines quality of the constraints in the world. 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.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tolerance double
getter/setter pair

Methods

addEquation(Equation eq) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeAllEquations() → void
removeEquation(Equation eq) → void
solve(double dt, World world) int
Should be implemented in subclasses! @todo use abstract @return number of iterations performed
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited