Class DebugConfiguration

java.lang.Object
com.jme3.bullet.debug.DebugConfiguration

public class DebugConfiguration extends Object
Configuration data for physics (debug) visualization. For internal use only.
  • Field Details

    • logger

      public static final Logger logger
      message logger for this class
  • Constructor Details

    • DebugConfiguration

      public DebugConfiguration()
      Instantiate a configuration with no space and no viewports.

      This no-arg constructor was made explicit to avoid javadoc warnings from JDK 18+.

  • Method Details

    • axisArrowLength

      public float axisArrowLength()
      Determine the length of axis arrows.
      Returns:
      length (in physics-space units, ≥0)
    • axisLineWidth

      public float axisLineWidth()
      Determine the line width of axis arrows.
      Returns:
      width (in pixels, ≥1) or 0 for solid arrows
    • getCamera

      public com.jme3.renderer.Camera getCamera()
      Access the Camera used for visualization.
      Returns:
      the pre-existing instance, or null if unknown
    • getSpace

      public PhysicsSpace getSpace()
      Access the PhysicsSpace.
      Returns:
      the pre-existing instance, or null if none
    • getTransformSpatial

      public com.jme3.scene.Spatial getTransformSpatial()
      Access the Spatial used to convert physics-space coordinates into world coordinates.
      Returns:
      spatial the pre-existing Spatial, or null if none
    • initialize

      public void initialize(com.jme3.app.Application application)
      Set the camera and viewport based on the specified Application, unless they've already been set.
      Parameters:
      application - the Application from which to obtain the default camera and viewport (not null, unaffected)
    • isEnabled

      public boolean isEnabled()
      Test whether (debug) visualization is enabled.
      Returns:
      true if enabled, otherwise false
    • setAngularVelocityFilter

      public void setAngularVelocityFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which angular velocities are included in the visualization.
      Parameters:
      filter - the desired filter (alias created) or null to visualize no angular velocities (default=null)
    • setAxisArrowLength

      public void setAxisArrowLength(float length)
      Alter the length of axis arrows.
      Parameters:
      length - the desired length (in world units, ≥0)
    • setAxisLineWidth

      public void setAxisLineWidth(float width)
      Alter the line width for axis arrows.
      Parameters:
      width - the desired width (in pixels, ≥1) or 0 for solid arrows (default=1)
    • setBoundingBoxFilter

      public void setBoundingBoxFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which bounding boxes are included in the visualization.
      Parameters:
      filter - the filter to use (alias created) or null to visualize no bounding boxes (default=null)
    • setCamera

      public void setCamera(com.jme3.renderer.Camera camera)
      Alter which Camera is used for (debug) visualization.
      Parameters:
      camera - the Camera to use (alias created) or null for unknown (defaults to the application's main camera)
    • setEnabled

      public void setEnabled(boolean enable)
      Alter whether (debug) visualization is enabled. Changes take effect on the next update.
      Parameters:
      enable - true → enable, false → disable (default=false)
    • setFilter

      public void setFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which physics objects are included in the visualization.
      Parameters:
      filter - the desired filter (alias created) or null to visualize all objects (default=null)
    • setGravityVectorFilter

      public void setGravityVectorFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which gravity vectors are included in the visualization.
      Parameters:
      filter - the desired filter (alias created) or null to visualize no gravity vectors (default=null)
    • setInitListener

      public void setInitListener(DebugInitListener listener)
      Replace or remove the init listener for the BulletDebugAppState.
      Parameters:
      listener - the listener to register (alias created) or null to de-register the current listener (default=null)
    • setJointLineWidth

      public void setJointLineWidth(float width)
      Alter the line width for PhysicsJoint arrows.
      Parameters:
      width - the desired width (in pixels, ≥1, default=1)
    • setShadowMode

      public void setShadowMode(com.jme3.renderer.queue.RenderQueue.ShadowMode mode)
      Alter the shadow mode for the (debug) root node.
      Parameters:
      mode - the desired mode (not null, default=Off)
    • setSpace

      public void setSpace(PhysicsSpace physicsSpace)
      Alter which PhysicsSpace will be visualized.
      Parameters:
      physicsSpace - the PhysicsSpace to visualize (alias created) or null for none
    • setSweptSphereFilter

      public void setSweptSphereFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which swept spheres are included in the visualization.
      Parameters:
      filter - the filter to use (alias created) or null to visualize no swept spheres (default=null)
    • setTransformSpatial

      public void setTransformSpatial(com.jme3.scene.Spatial spatial)
      Alter the conversion from physics-space coordinates to world coordinates.
      Parameters:
      spatial - the Spatial to use for coordinate transformations (alias created) or null for physics=world (default=null)
    • setVelocityVectorFilter

      public void setVelocityVectorFilter(BulletDebugAppState.DebugAppStateFilter filter)
      Alter which velocity vectors are included in the visualization.
      Parameters:
      filter - the desired filter (alias created) or null to visualize no velocity vectors (default=null)
    • setViewPorts

      public void setViewPorts(com.jme3.renderer.ViewPort... viewPorts)
      Alter which view ports will render the visualization.
      Parameters:
      viewPorts - (not null, aliases created)