public interface PhysicsControl extends Control
This interface is shared between JBullet and Native Bullet.
Modifier and Type | Method and Description |
---|---|
PhysicsSpace |
getPhysicsSpace()
Access the physics space to which the object is (or would be) added.
|
boolean |
isEnabled()
Test whether this control is enabled.
|
void |
setEnabled(boolean state)
Enable or disable this control.
|
void |
setPhysicsSpace(PhysicsSpace space)
If enabled, add this control's physics object to the specified physics
space.
|
cloneForSpatial, render, setSpatial, update
void setPhysicsSpace(PhysicsSpace space)
space
- where to add, or null to simply removePhysicsSpace getPhysicsSpace()
void setEnabled(boolean state)
The physics object is removed from its physics space when the control is disabled. When the control is enabled again, the physics object is moved to the current location of the spatial and then added to the physics space.
state
- true→enable the control, false→disable itboolean isEnabled()