Class BulletVehicleDebugControl

All Implemented Interfaces:
Savable, Control, JmeCloneable, Cloneable

public class BulletVehicleDebugControl extends AbstractPhysicsDebugControl
A physics-debug control used to visualize a PhysicsVehicle.

This class is shared between JBullet and Native Bullet.

  • Field Details

    • body

      protected final PhysicsVehicle body
    • suspensionNode

      protected final Node suspensionNode
    • location

      protected final Vector3f location
    • rotation

      protected final Quaternion rotation
  • Constructor Details

    • BulletVehicleDebugControl

      public BulletVehicleDebugControl(BulletDebugAppState debugAppState, PhysicsVehicle body)
      Instantiate an enabled control to visualize the specified vehicle.
      Parameters:
      debugAppState - which app state (not null, alias created)
      body - which vehicle to visualize (not null, alias created)
  • Method Details

    • setSpatial

      public void setSpatial(Spatial spatial)
      Alter which spatial is controlled. Invoked when the control is added to or removed from a spatial. Should be invoked only by a subclass or from Spatial. Do not invoke directly from user code.
      Specified by:
      setSpatial in interface Control
      Overrides:
      setSpatial in class AbstractControl
      Parameters:
      spatial - the spatial to control (or null)
    • controlUpdate

      protected void controlUpdate(float tpf)
      Update this control. Invoked once per frame during the logical-state update, provided the control is enabled and added to a scene. Should be invoked only by a subclass or by AbstractControl.
      Specified by:
      controlUpdate in class AbstractPhysicsDebugControl
      Parameters:
      tpf - the time interval between frames (in seconds, ≥0)
    • controlRender

      protected void controlRender(RenderManager rm, ViewPort vp)
      Render this control. Invoked once per frame, provided the control is enabled and added to a scene. Should be invoked only by a subclass or by AbstractControl.
      Specified by:
      controlRender in class AbstractControl
      Parameters:
      rm - the render manager (not null)
      vp - the view port to render (not null)