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.
  • Field Details

    • logger

      public static final Logger logger
      message logger for this class
    • debugSpatial

      protected com.jme3.scene.Spatial debugSpatial
      Spatial to visualize lastShape (not null)
  • Constructor Details

    • BulletGhostObjectDebugControl

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

    • 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 com.jme3.scene.control.AbstractControl
      Parameters:
      tpf - the time interval between frames (in seconds, ≥0)
    • colorChildren

      protected void colorChildren()
      Color each child of the debug node for a CompoundCollisionShape. Invoked when child coloring is enabled.
    • hasShapeChanged

      protected boolean hasShapeChanged(CollisionShape newShape)
      Compare the specified CollisionShape with the lastShape.
      Parameters:
      newShape - the new shape (not null, unaffected)
      Returns:
      true if the shape has changed, otherwise false
    • setShape

      protected void setShape(CollisionShape shape)
      Replace the lastShape and update related fields.
      Parameters:
      shape - (not null, alias created)
    • 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)