PhysicsEngine3D class abstract interface

A 3-D physics engine: makes PhysicsWorld3Ds.

PhysicsEngineFactory.create3D gives the platform's (JoltPhysicsEngine, Jolt Physics through just_jolt); package:just_physics_engine/testing.dart has a simple one for tests. Whoever holds the worlds never needs to know which.

Units are metres, seconds and radians; +Y is down, so gravity is usually (0, +9.81, 0).

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
A short name for logs: jolt, fake.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unavailableReason → String?
Why this engine cannot run here (the web, a native library not in the build), or null when it can.
no setter

Methods

createWorld(PhysicsWorldSettings3D settings) → PhysicsWorld3D
Makes a world. Throws a Physics3DUnsupportedError saying why when unavailableReason is not null.
destroyAll() → void
Destroys every world this engine made in this process, whoever made it — for a hot restart, when the Dart objects that owned them are gone but native memory is not. A world still held reads as disposed.
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