Class PhysicsDumper

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

public class PhysicsDumper extends Dumper
Dump Minie data structures for debugging purposes.

The level of detail can be configured dynamically.

  • Field Details

    • logger

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

    • PhysicsDumper

      public PhysicsDumper()
      Instantiate a PhysicsDumper that uses System.out for output.
    • PhysicsDumper

      public PhysicsDumper(PrintStream printStream)
      Instantiate a PhysicsDumper that uses the specified output stream.
      Parameters:
      printStream - output stream (not null)
  • Method Details

    • dump

      public void dump(CollisionShape shape, String indent)
      Dump the specified CollisionShape.
      Parameters:
      shape - the shape to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(MultiBodyCollider collider, String indent)
      Dump the specified MultiBodyCollider.
      Parameters:
      collider - the collider to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsCharacter character, String indent)
      Dump the specified PhysicsCharacter.
      Parameters:
      character - the character to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsGhostObject ghost, String indent)
      Dump the specified PhysicsGhostObject.
      Parameters:
      ghost - the ghost object to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsJoint joint, String indent)
      Dump the specified PhysicsJoint in a PhysicsSpace context.
      Parameters:
      joint - the joint to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsRigidBody body, String indent)
      Dump the specified PhysicsRigidBody.
      Parameters:
      body - the rigid body to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsSoftBody body, String indent)
      Dump the specified PhysicsSoftBody.
      Parameters:
      body - the soft body to dump (not null, unaffected)
      indent - (not null)
    • dump

      public void dump(PhysicsSpace space)
      Dump the specified PhysicsSpace.
      Parameters:
      space - the PhysicsSpace to dump (not null, unaffected)
    • dump

      public void dump(PhysicsSpace space, String indent)
      Dump the specified PhysicsSpace. TODO dump a CollisionSpace
      Parameters:
      space - the PhysicsSpace to dump (not null, unaffected)
      indent - (not null, may be empty)
    • isEnabled

      public boolean isEnabled(DumpFlags dumpFlag)
      Test whether the specified dump flag is set.
      Parameters:
      dumpFlag - which flag to test (not null)
      Returns:
      true if output is enabled, otherwise false
    • setEnabled

      public PhysicsDumper setEnabled(DumpFlags dumpFlag, boolean newValue)
      Configure the specified dump flag.
      Parameters:
      dumpFlag - which flag to set (not null)
      newValue - true to enable output, false to disable it
      Returns:
      this instance for chaining
    • clone

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

      public PhysicsDescriber getDescriber()
      Access the Describer used by this Dumper.
      Overrides:
      getDescriber in class Dumper
      Returns:
      the pre-existing instance (not null)