Class Dumper

java.lang.Object
jme3utilities.debug.Dumper
All Implemented Interfaces:
Cloneable

public class Dumper extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    protected final PrintStream
    stream to use for output: set by constructor
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Type
    Method
    Description
    protected void
    addDescription(String description)
    If the specified description is non-empty, print it to the stream, prefixed by a blank.
    protected void
    addLine(String indent)
    Print a newline, followed by the specified indentation.
    Create a deep copy of this Dumper.
    void
    dump(com.jme3.anim.AnimClip clip, String indent)
    Dump the specified AnimClip.
    void
    dump(com.jme3.anim.Armature armature, String indent)
    Dump the specified Armature and all its joints.
    void
    dump(com.jme3.anim.Joint joint, String indent)
    Dump the specified Joint, including its children.
    void
    dump(com.jme3.animation.Bone bone, String indent)
    Dump the specified Bone, including its children.
    void
    dump(com.jme3.animation.Skeleton skeleton, String indent)
    Dump the specified skeleton and all its bones.
    void
    dump(com.jme3.app.state.AppStateManager manager)
    Dump the specified AppStateManager.
    protected void
    dump(com.jme3.app.state.AppState appState, String indent)
    Dump the specified AppState.
    void
    dump(com.jme3.light.Light light, String indent)
    Dump the specified Light, with indentation.
    void
    dump(com.jme3.renderer.Camera camera)
    Dump the specified Camera.
    void
    dump(com.jme3.renderer.Camera camera, String indent)
    Dump the specified Camera, with indentation.
    void
    dump(com.jme3.renderer.RenderManager renderManager)
    Dump the specified RenderManager.
    void
    dump(com.jme3.renderer.ViewPort viewPort)
    Dump the specified ViewPort.
    void
    dump(com.jme3.renderer.ViewPort viewPort, String indent)
    Dump the specified ViewPort.
    void
    dump(com.jme3.scene.Spatial spatial)
    Dump the specified subtree of a scene graph.
    void
    dump(com.jme3.scene.Spatial spatial, String indent)
    Dump the specified subtree of a scene graph.
    void
    dump(List<com.jme3.scene.Spatial> sceneList, String indent)
    Dump the specified list of scenes.
    Access the Describer used by this dumper.
    Return the indent increment.
    boolean
    Test whether world bounds will be dumped.
    boolean
    Test whether render-queue bucket assignments will be dumped.
    boolean
    Test whether cull hints will be dumped.
    boolean
    Test whether material parameters will be dumped.
    boolean
    Test whether material-parameter overrides will be dumped.
    boolean
    Test whether shadow modes will be dumped.
    boolean
    Test whether location and scaling will be dumped.
    boolean
    Test whether user data will be dumped.
    boolean
    Test whether mesh-vertex data will be dumped.
    int
    Return 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.
    Configure the indent increment.
    setMaxChildren(int newLimit)
    Configure the maximum number of children per Node.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • stream

      protected final PrintStream 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

      public Dumper(PrintStream printStream)
      Instantiate a dumper that will use the specified output stream.
      Parameters:
      printStream - the output stream (not null, alias created)
  • Method Details

    • dump

      public void dump(com.jme3.anim.AnimClip clip, String indent)
      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

      public void dump(com.jme3.anim.Armature armature, String indent)
      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

      public void dump(com.jme3.animation.Bone bone, String indent)
      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

      public void dump(com.jme3.renderer.Camera camera, String indent)
      Dump the specified Camera, with indentation.
      Parameters:
      camera - (not null, unaffected)
      indent - the indent text (not null, may be empty)
    • dump

      public void dump(com.jme3.anim.Joint joint, String indent)
      Dump the specified Joint, including its children.
      Parameters:
      joint - (not null, unaffected)
      indent - the indent text (not null, may be empty)
    • dump

      public void dump(com.jme3.light.Light light, String indent)
      Dump the specified Light, with indentation.
      Parameters:
      light - (not null, unaffected)
      indent - the indent text (not null, may be empty)
    • dump

      public void dump(List<com.jme3.scene.Spatial> sceneList, String indent)
      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

      public void dump(com.jme3.animation.Skeleton skeleton, String indent)
      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

      public void dump(com.jme3.scene.Spatial spatial, String indent)
      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

      public void dump(com.jme3.renderer.ViewPort viewPort, String indent)
      Dump the specified ViewPort.
      Parameters:
      viewPort - which ViewPort to dump (not null, unaffected)
      indent - the indent text (not null, may be empty)
    • getDescriber

      public Describer getDescriber()
      Access the Describer used by this dumper.
      Returns:
      the pre-existing instance (not null)
    • indentIncrement

      public String 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

      public Dumper setDescriber(Describer newDescriber)
      Replace the current Describer with the specified one.
      Parameters:
      newDescriber - the desired Describer (not null, alias created)
      Returns:
      this instance for chaining
    • setDumpBounds

      public Dumper setDumpBounds(boolean newValue)
      Configure dumping of world bounds.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpBucket

      public Dumper setDumpBucket(boolean newValue)
      Configure dumping of render-queue bucket assignments.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpCull

      public Dumper setDumpCull(boolean newValue)
      Configure dumping of cull hints.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpMatParam

      public Dumper setDumpMatParam(boolean newValue)
      Configure dumping of material parameters.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpOverride

      public Dumper setDumpOverride(boolean newValue)
      Configure dumping of material-parameter overrides.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpShadow

      public Dumper setDumpShadow(boolean newValue)
      Configure dumping of shadow modes.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpTransform

      public Dumper setDumpTransform(boolean newValue)
      Configure dumping of location and scaling.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setDumpUser

      public Dumper setDumpUser(boolean newValue)
      Configure dumping of user data.
      Parameters:
      newValue - true to enable, false to disable (default=true)
      Returns:
      this instance for chaining
    • setDumpVertex

      public Dumper setDumpVertex(boolean newValue)
      Configure dumping of mesh-vertex data.
      Parameters:
      newValue - true to enable, false to disable (default=false)
      Returns:
      this instance for chaining
    • setIndentIncrement

      public Dumper setIndentIncrement(String newValue)
      Configure the indent increment.
      Parameters:
      newValue - (not null, default=" ")
      Returns:
      this instance for chaining
    • setMaxChildren

      public Dumper setMaxChildren(int newLimit)
      Configure the maximum number of children per Node.
      Parameters:
      newLimit - the desired limit (≥0, default=MAX_VALUE)
      Returns:
      this instance for chaining
    • addDescription

      protected void addDescription(String description)
      If the specified description is non-empty, print it to the stream, prefixed by a blank.
      Parameters:
      description - (not null)
    • addLine

      protected void addLine(String indent)
      Print a newline, followed by the specified indentation.
      Parameters:
      indent - (not null)
    • dump

      protected void dump(com.jme3.app.state.AppState appState, String indent)
      Dump the specified AppState.
      Parameters:
      appState - the app state to dump (not null, unaffected)
      indent - the indent text (not null, may be empty)
    • clone

      public Dumper clone() throws CloneNotSupportedException
      Create a deep copy of this Dumper.
      Overrides:
      clone in class Object
      Returns:
      a new instance, equivalent to this one, with its own Describer
      Throws:
      CloneNotSupportedException - if the superclass isn't cloneable