Constraint

Interface for all Constraints

Constraint interface cannot be instantiated

Methods

applyCorrection(timeStep)

Applies positional correction on particle.

Parameters:
NameTypeDescription
timeStepNumber

(abstract) particles() → {Array.<Particle>}

Calculates the list of particles that is involved with the constraint

Returns:
Type: 
Array.<Particle>

(abstract) update(timeStep)

Updates the constraint.

Parameters:
NameTypeDescription
timeStepNumber

(abstract) vertices() → {Array.<Vector2D>}

Calculates the list of vertices that will be used in the rendering process

Returns:
Type: 
Array.<Vector2D>