Class AbstractPhysicsDebugControl

java.lang.Object
com.jme3.scene.control.AbstractControl
com.jme3.bullet.debug.AbstractPhysicsDebugControl
All Implemented Interfaces:
com.jme3.export.Savable, com.jme3.scene.control.Control, com.jme3.util.clone.JmeCloneable, Cloneable
Direct Known Subclasses:
BulletCharacterDebugControl, BulletGhostObjectDebugControl, BulletJointDebugControl, BulletRigidBodyDebugControl, BulletVehicleDebugControl

public abstract class AbstractPhysicsDebugControl extends com.jme3.scene.control.AbstractControl
The abstract base class for physics-debug controls (such as BulletRigidBodyDebugControl) used to visualize individual collision objects and joints.

This class is shared between JBullet and Native Bullet.

Author:
normenhansen
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final BulletDebugAppState
    the app state that this control serves

    Fields inherited from class com.jme3.scene.control.AbstractControl

    enabled, spatial
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiate an enabled control to serve the specified debug app state.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    applyPhysicsTransform(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation)
    Apply the specified location and orientation to the controlled spatial.
    protected void
    applyPhysicsTransform(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation, com.jme3.scene.Spatial spatial)
    Apply the specified location and orientation to the specified spatial.
    protected abstract void
    controlUpdate(float tpf)
    This is called on the physics thread for debug controls

    Methods inherited from class com.jme3.scene.control.AbstractControl

    cloneFields, cloneForSpatial, controlRender, getSpatial, isEnabled, jmeClone, read, render, setEnabled, setSpatial, update, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • debugAppState

      protected final BulletDebugAppState debugAppState
      the app state that this control serves
  • Constructor Details

    • AbstractPhysicsDebugControl

      public AbstractPhysicsDebugControl(BulletDebugAppState debugAppState)
      Instantiate an enabled control to serve the specified debug app state.
      Parameters:
      debugAppState - which app state (not null, alias created)
  • Method Details

    • controlUpdate

      protected abstract void controlUpdate(float tpf)
      This is called on the physics thread for debug controls
      Specified by:
      controlUpdate in class com.jme3.scene.control.AbstractControl
    • applyPhysicsTransform

      protected void applyPhysicsTransform(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation)
      Apply the specified location and orientation to the controlled spatial.
      Parameters:
      worldLocation - location vector (in physics-space coordinates, not null, unaffected)
      worldRotation - orientation (in physics-space coordinates, not null, unaffected)
    • applyPhysicsTransform

      protected void applyPhysicsTransform(com.jme3.math.Vector3f worldLocation, com.jme3.math.Quaternion worldRotation, com.jme3.scene.Spatial spatial)
      Apply the specified location and orientation to the specified spatial.
      Parameters:
      worldLocation - location vector (in physics-space coordinates, not null, unaffected)
      worldRotation - orientation (in physics-space coordinates, not null, unaffected)
      spatial - where to apply (may be null)