DragForce class
Velocity-proportional drag (air resistance).
Each frame the velocity magnitude is reduced by:
v *= 1 - coefficient * dt
A coefficient of 0.1 removes ~10% of velocity per second.
- Inheritance
-
- Object
- ParticleForce
- DragForce
Properties
- coefficient → double
-
Drag coefficient in
0, 1range. Typical values: 0.02–0.15.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
Particle particle, double dt) → void -
Apply this force to
particlefor a time step ofdtseconds.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited