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
-
Constructor Summary
ConstructorDescriptionInstantiate a configuration with no space and no viewports. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Determine the length of axis arrows.float
Determine the line width of axis arrows.com.jme3.renderer.Camera
Access the Camera used for visualization.getSpace()
Access the PhysicsSpace.com.jme3.scene.Spatial
Access the Spatial used to convert physics-space coordinates into world coordinates.void
initialize
(com.jme3.app.Application application) Set the camera and viewport based on the specified Application, unless they've already been set.boolean
Test whether (debug) visualization is enabled.void
Alter which angular velocities are included in the visualization.void
setAxisArrowLength
(float length) Alter the length of axis arrows.void
setAxisLineWidth
(float width) Alter the line width for axis arrows.void
Alter which bounding boxes are included in the visualization.void
setCamera
(com.jme3.renderer.Camera camera) Alter which Camera is used for (debug) visualization.void
setEnabled
(boolean enable) Alter whether (debug) visualization is enabled.void
Alter which physics objects are included in the visualization.void
Alter which gravity vectors are included in the visualization.void
setInitListener
(DebugInitListener listener) Replace or remove the init listener for the BulletDebugAppState.void
setJointLineWidth
(float width) Alter the line width for PhysicsJoint arrows.void
setShadowMode
(com.jme3.renderer.queue.RenderQueue.ShadowMode mode) Alter the shadow mode for the (debug) root node.void
setSpace
(PhysicsSpace physicsSpace) Alter which PhysicsSpace will be visualized.void
Alter which swept spheres are included in the visualization.void
setTransformSpatial
(com.jme3.scene.Spatial spatial) Alter the conversion from physics-space coordinates to world coordinates.void
Alter which velocity vectors are included in the visualization.void
setViewPorts
(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)
-