DistanceConstraint class

Constrains two bodies to be at a constant distance from each others center of mass.

Inheritance

Constructors

DistanceConstraint(Body bodyA, Body bodyB, [double? distance, double maxForce = 1e6])
distance The distance to keep. If undefined, it will be set to the current distance between bodyA and bodyB. maxForce The maximum force that should be applied to constrain the bodies.

Properties

bodyA Body
getter/setter pairinherited
bodyB Body
getter/setter pairinherited
collideConnected bool
Set to false if you don't want the bodies to collide when they are connected.
getter/setter pairinherited
distance double
The distance to keep. If undefined, it will be set to the current distance between bodyA and bodyB
getter/setter pair
distanceEquation ContactEquation
getter/setter pair
equations List<Equation>
Equations to be solved in this constraint.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
id int
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

disable() → void
Disables all equations in the constraint.
inherited
enable() → void
Enables all equations in the constraint.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update() → void
update
override

Operators

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