Class BulletGhostObjectDebugControl

java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.bullet.debug.AbstractPhysicsDebugControl
com.jme3.bullet.debug.BulletGhostObjectDebugControl
All Implemented Interfaces:
com.jme3.export.Savable, com.jme3.scene.control.Control, com.jme3.util.clone.JmeCloneable, Cloneable

public class BulletGhostObjectDebugControl extends AbstractPhysicsDebugControl
A physics-debug control used to visualize a PhysicsGhostObject.

This class is shared between JBullet and Native Bullet.

Author:
normenhansen
  • Field Details

    • body

      protected final PhysicsGhostObject body
      ghost object to visualize (not null)
    • location

      protected final com.jme3.math.Vector3f location
      temporary storage for physics location
    • rotation

      protected final com.jme3.math.Quaternion rotation
      temporary storage for physics rotation
    • myShape

      protected CollisionShape myShape
      shape for which geom was generated (not null)
    • geom

      protected com.jme3.scene.Spatial geom
      geometry to visualize myShape (not null)
  • Constructor Details

    • BulletGhostObjectDebugControl

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

    • setSpatial

      public void setSpatial(com.jme3.scene.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 com.jme3.scene.control.Control
      Overrides:
      setSpatial in class com.jme3.scene.control.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(com.jme3.renderer.RenderManager rm, com.jme3.renderer.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 com.jme3.scene.control.AbstractControl
      Parameters:
      rm - the render manager (not null)
      vp - the view port to render (not null)