Class MechanicsFactory
java.lang.Object
org.episteme.natural.physics.classical.mechanics.collision.MechanicsFactory
Factory for creating rigid body dynamics backends using SPI-based discovery.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RigidBodyBridgecreateRigidBody(RigidBody body) Helper to create a native rigid body directly (though usually done via PhysicsWorld).static PhysicsWorldBridgeCreates a new physics world using the active backend.static Collection<MechanicsBackend> Returns all discovered mechanics backends.static StringGets the currently selected backend ID.static booleanisBackendAvailable(String backendId) Checks if a specific backend is available.static voidsetBackend(String backendId) Sets the preferred backend by ID.
-
Constructor Details
-
MechanicsFactory
public MechanicsFactory()
-
-
Method Details
-
setBackend
Sets the preferred backend by ID.- Parameters:
backendId- Backend ID or null for AUTO
-
getSelectedBackendId
Gets the currently selected backend ID. -
createWorld
Creates a new physics world using the active backend. -
createRigidBody
Helper to create a native rigid body directly (though usually done via PhysicsWorld). -
getAvailableBackends
Returns all discovered mechanics backends. -
isBackendAvailable
Checks if a specific backend is available.
-