Constraint class abstract

A constraint limits or otherwise controls a Node's properties, such as position or rotation. Add a list of constraints by setting the Node's constraints property.

Constrains are applied after the update calls are completed. They can also be applied at any time by calling Node.applyConstraints. It's possible to create custom constraints by overriding this class and implementing the constrain method.

Implementers

Constructors

Constraint()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

constrain(Node node, double dt) → void
Called after update is complete, if the constraint has been added to a Node. Override this method to modify the node's property according to the constraint.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preUpdate(Node node, double dt) → void
Called before the node's update method is called. This method can be overridden to create setup work that needs to happen before the the node is updated, e.g. to calculate the node's speed.
toString() String
A string representation of this object.
inherited

Operators

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