Class AbstractPhysicsDebugControl

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

public abstract class AbstractPhysicsDebugControl extends 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.

  • 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 AbstractControl
      Parameters:
      tpf - time per frame (in seconds)
    • applyPhysicsTransform

      protected void applyPhysicsTransform(Vector3f worldLocation, 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(Vector3f worldLocation, Quaternion worldRotation, 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)