Package jme3utilities.debug
Class Dumper
java.lang.Object
jme3utilities.debug.Dumper
- All Implemented Interfaces:
Cloneable
Dump portions of a jME3 scene graph for debugging.
dump(com.jme3.scene.Spatial) is the usual interface to this class.
The level of detail can be configured dynamically.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PrintStreamstream to use for output: set by constructor -
Constructor Summary
ConstructorsConstructorDescriptionDumper()Instantiate a dumper that will use System.out for output.Dumper(PrintStream printStream) Instantiate a dumper that will use the specified output stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDescription(String description) If the specified description is non-empty, print it to the stream, prefixed by a blank.protected voidPrint a newline, followed by the specified indentation.clone()Create a deep copy of this Dumper.voidDump the specified AnimClip.voidDump the specified Armature and all its joints.voidDump the specified Joint, including its children.voidDump the specified Bone, including its children.voidDump the specified skeleton and all its bones.voiddump(com.jme3.app.state.AppStateManager manager) Dump the specified AppStateManager.protected voidDump the specified AppState.voidDump the specified Light, with indentation.voiddump(com.jme3.renderer.Camera camera) Dump the specified Camera.voidDump the specified Camera, with indentation.voiddump(com.jme3.renderer.RenderManager renderManager) Dump the specified RenderManager.voiddump(com.jme3.renderer.ViewPort viewPort) Dump the specified ViewPort.voidDump the specified ViewPort.voiddump(com.jme3.scene.Spatial spatial) Dump the specified subtree of a scene graph.voidDump the specified subtree of a scene graph.voidDump the specified list of scenes.Access the Describer used by this dumper.Return the indent increment.booleanTest whether world bounds will be dumped.booleanTest whether render-queue bucket assignments will be dumped.booleanTest whether cull hints will be dumped.booleanTest whether material parameters will be dumped.booleanTest whether material-parameter overrides will be dumped.booleanTest whether shadow modes will be dumped.booleanTest whether location and scaling will be dumped.booleanTest whether user data will be dumped.booleanTest whether mesh-vertex data will be dumped.intReturn the maximum number of children per Node.setDescriber(Describer newDescriber) Replace the current Describer with the specified one.setDumpBounds(boolean newValue) Configure dumping of world bounds.setDumpBucket(boolean newValue) Configure dumping of render-queue bucket assignments.setDumpCull(boolean newValue) Configure dumping of cull hints.setDumpMatParam(boolean newValue) Configure dumping of material parameters.setDumpOverride(boolean newValue) Configure dumping of material-parameter overrides.setDumpShadow(boolean newValue) Configure dumping of shadow modes.setDumpTransform(boolean newValue) Configure dumping of location and scaling.setDumpUser(boolean newValue) Configure dumping of user data.setDumpVertex(boolean newValue) Configure dumping of mesh-vertex data.setIndentIncrement(String newValue) Configure the indent increment.setMaxChildren(int newLimit) Configure the maximum number of children per Node.
-
Field Details
-
stream
stream to use for output: set by constructor
-
-
Constructor Details
-
Dumper
public Dumper()Instantiate a dumper that will use System.out for output. -
Dumper
Instantiate a dumper that will use the specified output stream.- Parameters:
printStream- the output stream (not null, alias created)
-
-
Method Details
-
dump
Dump the specified AnimClip.- Parameters:
clip- the clip to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
public void dump(com.jme3.app.state.AppStateManager manager) Dump the specified AppStateManager.- Parameters:
manager- (not null, unaffected)
-
dump
Dump the specified Armature and all its joints.- Parameters:
armature- the armature to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
Dump the specified Bone, including its children.- Parameters:
bone- (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
public void dump(com.jme3.renderer.Camera camera) Dump the specified Camera.- Parameters:
camera- (not null, unaffected)
-
dump
Dump the specified Camera, with indentation.- Parameters:
camera- (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
Dump the specified Joint, including its children.- Parameters:
joint- (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
Dump the specified Light, with indentation.- Parameters:
light- (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
Dump the specified list of scenes.- Parameters:
sceneList- the root nodes of the scenes to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
public void dump(com.jme3.renderer.RenderManager renderManager) Dump the specified RenderManager.- Parameters:
renderManager- which RenderManager to dump (not null, unaffected)
-
dump
Dump the specified skeleton and all its bones.- Parameters:
skeleton- the skeleton to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
dump
public void dump(com.jme3.scene.Spatial spatial) Dump the specified subtree of a scene graph.- Parameters:
spatial- root of the subtree (may be null, unaffected)
-
dump
Dump the specified subtree of a scene graph. Note: recursive!- Parameters:
spatial- root of the subtree (may be null, unaffected)indent- the indent text (not null, may be empty)
-
dump
public void dump(com.jme3.renderer.ViewPort viewPort) Dump the specified ViewPort.- Parameters:
viewPort- which ViewPort to dump (not null, unaffected)
-
dump
Dump the specified ViewPort.- Parameters:
viewPort- which ViewPort to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
getDescriber
Access the Describer used by this dumper.- Returns:
- the pre-existing instance (not null)
-
indentIncrement
Return the indent increment.- Returns:
- (not null, may be empty)
-
isDumpBounds
public boolean isDumpBounds()Test whether world bounds will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpBucket
public boolean isDumpBucket()Test whether render-queue bucket assignments will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpCull
public boolean isDumpCull()Test whether cull hints will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpMatParam
public boolean isDumpMatParam()Test whether material parameters will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpOverride
public boolean isDumpOverride()Test whether material-parameter overrides will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpShadow
public boolean isDumpShadow()Test whether shadow modes will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpTransform
public boolean isDumpTransform()Test whether location and scaling will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpUser
public boolean isDumpUser()Test whether user data will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
isDumpVertex
public boolean isDumpVertex()Test whether mesh-vertex data will be dumped.- Returns:
- true if they'll be dumped, otherwise false
-
maxChildren
public int maxChildren()Return the maximum number of children per Node.- Returns:
- the current limit (≥0, default=MAX_VALUE)
-
setDescriber
Replace the current Describer with the specified one.- Parameters:
newDescriber- the desired Describer (not null, alias created)- Returns:
- this instance for chaining
-
setDumpBounds
Configure dumping of world bounds.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpBucket
Configure dumping of render-queue bucket assignments.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpCull
Configure dumping of cull hints.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpMatParam
Configure dumping of material parameters.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpOverride
Configure dumping of material-parameter overrides.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpShadow
Configure dumping of shadow modes.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpTransform
Configure dumping of location and scaling.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setDumpUser
Configure dumping of user data.- Parameters:
newValue- true to enable, false to disable (default=true)- Returns:
- this instance for chaining
-
setDumpVertex
Configure dumping of mesh-vertex data.- Parameters:
newValue- true to enable, false to disable (default=false)- Returns:
- this instance for chaining
-
setIndentIncrement
Configure the indent increment.- Parameters:
newValue- (not null, default=" ")- Returns:
- this instance for chaining
-
setMaxChildren
Configure the maximum number of children per Node.- Parameters:
newLimit- the desired limit (≥0, default=MAX_VALUE)- Returns:
- this instance for chaining
-
addDescription
If the specified description is non-empty, print it to the stream, prefixed by a blank.- Parameters:
description- (not null)
-
addLine
Print a newline, followed by the specified indentation.- Parameters:
indent- (not null)
-
dump
Dump the specified AppState.- Parameters:
appState- the app state to dump (not null, unaffected)indent- the indent text (not null, may be empty)
-
clone
Create a deep copy of this Dumper.- Overrides:
clonein classObject- Returns:
- a new instance, equivalent to this one, with its own Describer
- Throws:
CloneNotSupportedException- if the superclass isn't cloneable
-