PhysicsWorld class final

Convenience wrapper around a Forge2D World.

Constructors

PhysicsWorld({Vector2? gravity, PhysicsSettings? settings})

Properties

bodies List<Body>
All bodies currently in the world.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
world → World
The underlying forge2d world.
final

Methods

createBody(BodyDef def) → Body
Creates a new body from the given def.
destroyBody(Body body) → void
Removes a body from the world.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
step(double dt) → void
Step the world by dt seconds.
toString() String
A string representation of this object.
inherited

Operators

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