Spring class

Constructors

Spring(PointMass p1, PointMass p2, {double stiffness = 1.0, SpringKind kind = SpringKind.structural, Spring? dependsOnA, Spring? dependsOnB})

Properties

dependsOnA → Spring?
Bend springs span two structural springs; they die when either does.
final
dependsOnB → Spring?
final
hashCode → int
The hash code for this object.
no setterinherited
isTorn ↔ bool
getter/setter pair
kind → SpringKind
final
p1 → PointMass
final
p2 → PointMass
final
restingDistance → double
final
restSquared → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stiffness → double
final

Methods

isOverstretched(double ratio) → bool
True when the spring is longer than ratio x its resting length.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshDependencies() → void
satisfy() → void
toString() → String
A string representation of this object.
inherited

Operators

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