Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Solver Abstract

Base class for constraint solvers.

Hierarchy

Index

Constructors

Properties

equationSortFunction?: ((a: Equation, b: Equation) => number)

Type declaration

equations: Equation[]

Current equations in the solver.

type: number

The type of solver.

GS: 1

Gauss-Seidel solver.

Methods

  • Add an equation to be solved.

    Parameters

    Returns void

  • Add equations. Same as .addEquation, but this time the argument is an array of Equations

    Parameters

    Returns void

  • removeAllEquations(): void
  • Removes all currently added equations

    Returns void

  • Removes an equation

    Parameters

    Returns void

  • solve(dt: number, world: World): void
  • Method to be implemented in each subclass

    Parameters

    Returns void

  • sortEquations(): void
  • Sort all equations using the .equationSortFunction. Should be called by subclasses before solving.

    Returns void