Structure that describes a spring's constants.
Used to configure a SpringSimulation.
Constructors
- SpringDescription({double mass, double springConstant, double damping })
-
Creates a spring given the mass, spring constant and the damping coefficient.
const - SpringDescription.withDampingRatio({double mass, double springConstant, double ratio: 1.0 })
-
Creates a spring given the mass (m), spring constant (k), and damping ratio (ζ). The damping ratio is especially useful trying to determing the type of spring to create. A ratio of 1.0 creates a critically damped spring, > 1.0 creates an overdamped spring and < 1.0 an underdamped one.
Properties
- damping → double
-
The damping coefficient (c).
read-only - mass → double
-
The mass of the spring (m). The units are arbitrary, but all springs within a system should use the same mass units.
read-only - springConstant → double
-
The spring constant (k). The units of the spring constant are M/T², where M is the mass unit used for the value of the mass property, and T is the time unit used for driving the SpringSimulation.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited