public class BulletVehicleDebugControl extends AbstractPhysicsDebugControl
This class is shared between JBullet and Native Bullet.
Modifier and Type | Field and Description |
---|---|
protected PhysicsVehicle |
body |
protected Vector3f |
location |
protected Quaternion |
rotation |
protected Node |
suspensionNode |
debugAppState
enabled, spatial
Constructor and Description |
---|
BulletVehicleDebugControl(BulletDebugAppState debugAppState,
PhysicsVehicle body)
Instantiate an enabled control to visualize the specified vehicle.
|
Modifier and Type | Method and Description |
---|---|
protected void |
controlRender(RenderManager rm,
ViewPort vp)
Render this control.
|
protected void |
controlUpdate(float tpf)
Update this control.
|
void |
setSpatial(Spatial spatial)
Alter which spatial is controlled.
|
applyPhysicsTransform, applyPhysicsTransform
cloneFields, cloneForSpatial, getSpatial, isEnabled, jmeClone, read, render, setEnabled, update, write
protected final PhysicsVehicle body
protected final Node suspensionNode
protected final Vector3f location
protected final Quaternion rotation
public BulletVehicleDebugControl(BulletDebugAppState debugAppState, PhysicsVehicle body)
debugAppState
- which app state (not null, alias created)body
- which vehicle to visualize (not null, alias created)public void setSpatial(Spatial spatial)
setSpatial
in interface Control
setSpatial
in class AbstractControl
spatial
- the spatial to control (or null)protected void controlUpdate(float tpf)
controlUpdate
in class AbstractPhysicsDebugControl
tpf
- the time interval between frames (in seconds, ≥0)protected void controlRender(RenderManager rm, ViewPort vp)
controlRender
in class AbstractControl
rm
- the render manager (not null)vp
- the view port to render (not null)