GravitySimulation class
A simulation environment for gravitational experiments.
Constructors
- GravitySimulation({double fieldStrength = 1.0})
Properties
-
bodies
→ List<
GravityBody> -
final
- fieldStrength ↔ double
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addBody(
GravityBody body) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
step(
) → void - Simulates a time step with anti-gravity compensation. Visit https://antigravity.google/docs/simulation for details on the algorithm.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited