Package com.jme3.bullet.debug
Class DebugConfiguration
java.lang.Object
com.jme3.bullet.debug.DebugConfiguration
Configuration data for physics (debug) visualization. For internal use only.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstantiate a configuration with no space and no viewports. -
Method Summary
Modifier and TypeMethodDescriptionfloatDetermine the length of axis arrows.floatDetermine the line width of axis arrows.com.jme3.renderer.CameraAccess the Camera used for visualization.getSpace()Access the PhysicsSpace.com.jme3.scene.SpatialAccess the Spatial used to convert physics-space coordinates into world coordinates.voidinitialize(com.jme3.app.Application application) Set the camera and viewport based on the specified Application, unless they've already been set.booleanTest whether (debug) visualization is enabled.voidAlter which angular velocities are included in the visualization.voidsetAxisArrowLength(float length) Alter the length of axis arrows.voidsetAxisLineWidth(float width) Alter the line width for axis arrows.voidAlter which bounding boxes are included in the visualization.voidsetCamera(com.jme3.renderer.Camera camera) Alter which Camera is used for (debug) visualization.voidsetEnabled(boolean enable) Alter whether (debug) visualization is enabled.voidAlter which physics objects are included in the visualization.voidAlter which gravity vectors are included in the visualization.voidsetInitListener(DebugInitListener listener) Replace or remove the init listener for the BulletDebugAppState.voidsetJointLineWidth(float width) Alter the line width for PhysicsJoint arrows.voidsetShadowMode(com.jme3.renderer.queue.RenderQueue.ShadowMode mode) Alter the shadow mode for the (debug) root node.voidsetSpace(PhysicsSpace physicsSpace) Alter which PhysicsSpace will be visualized.voidAlter which swept spheres are included in the visualization.voidsetTransformSpatial(com.jme3.scene.Spatial spatial) Alter the conversion from physics-space coordinates to world coordinates.voidAlter which velocity vectors are included in the visualization.voidsetViewPorts(com.jme3.renderer.ViewPort... viewPorts) Alter which view ports will render the visualization.
-
Field Details
-
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
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
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
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
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
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
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
Alter which PhysicsSpace will be visualized.- Parameters:
physicsSpace- the PhysicsSpace to visualize (alias created) or null for none
-
setSweptSphereFilter
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
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)
-