Class PhysicsDescriber

java.lang.Object
jme3utilities.debug.Describer
jme3utilities.minie.PhysicsDescriber
All Implemented Interfaces:
Cloneable

public class PhysicsDescriber extends Describer
Generate compact textual descriptions of physics objects for debugging purposes.
  • Field Details

    • logger

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

    • PhysicsDescriber

      public PhysicsDescriber()
      Instantiate a describer with the default separator.

      This no-arg constructor was made explicit to avoid javadoc warnings from JDK 18+.

  • Method Details

    • describe

      public String describe(CollisionConfiguration configuration)
      Generate a textual description for a CollisionConfiguration.
      Parameters:
      configuration - the configuration to describe (not null, unaffected)
      Returns:
      description (not null)
    • describe

      public String describe(CollisionShape shape)
      Generate a textual description for a CollisionShape.
      Parameters:
      shape - (not null, unaffected)
      Returns:
      description (not null)
    • describe

      public String describe(PhysicsJoint joint)
      Generate a brief textual description for a PhysicsJoint.
      Parameters:
      joint - (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describe

      public String describe(RotationalLimitMotor motor)
      Describe the specified RotationalLimitMotor.
      Parameters:
      motor - the motor to describe (not null, unaffected)
      Returns:
      descriptive text (not null, not empty)
    • describe

      public String describe(SoftBodyMaterial material)
      Generate a brief textual description for the specified PhysicsSoftBody.Material
      Parameters:
      material - the Material to describe (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describe

      public String describe(SoftBodyWorldInfo info)
      Generate a brief textual description for the specified SoftBodyWorldInfo.
      Parameters:
      info - the info to describe (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describe

      public String describe(TranslationalLimitMotor motor, int axisIndex)
      Describe the indexed axis of the specified TranslationalLimitMotor.
      Parameters:
      motor - the motor to describe (not null, unaffected)
      axisIndex - which axis: 0→X, 1→Y, 2→Z
      Returns:
      descriptive text (not null, not empty)
    • describe

      public String describe(VehicleWheel wheel)
      Describe the specified VehicleWheel.
      Parameters:
      wheel - the wheel to describe (not null, unaffected)
      Returns:
      descriptive text (not null, not empty)
    • describe1

      public String describe1(SoftBodyConfig config)
      Generate the first line of a textual description for the specified SoftBodyConfig.
      Parameters:
      config - the config to describe (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describe2

      public String describe2(SoftBodyConfig config)
      Generate the 2nd line of a brief textual description for the specified SoftBodyConfig.
      Parameters:
      config - the config to describe (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describe2

      public String describe2(VehicleWheel wheel)
      Generate the 2nd line of a textual description for the specified VehicleWheel.
      Parameters:
      wheel - the wheel to describe (not null, unaffected)
      Returns:
      description (not null, not empty)
    • describeAngular

      public String describeAngular(SixDofJoint joint)
      Describe the angular components of the specified SixDofJoint.
      Parameters:
      joint - the joint to describe (not null, unaffected)
      Returns:
      descriptive text (not null, not empty)
    • describeDof

      public String describeDof(New6Dof constraint, int dofIndex)
      Describe the indexed degree of freedom of the specified New6Dof constraint.
      Parameters:
      constraint - the constraint to describe (not null, unaffected)
      dofIndex - which degree of freedom (0→X translation, 1→Y translation, 2→Z translation, 3→X rotation, 4→Y rotation, 5→Z rotation)
      Returns:
      descriptive text (not null, not empty)
    • describeGroups

      public String describeGroups(PhysicsCollisionObject pco)
      Briefly describe the collision group and collide-with groups of the specified collision object.
      Parameters:
      pco - the object to describe (not null, unaffected)
      Returns:
      descriptive text (not null, may be empty)
    • describeJointInBody

      public String describeJointInBody(PhysicsJoint joint, PhysicsBody body, boolean forceId)
      Describe the specified PhysicsJoint in the context of the specified body.
      Parameters:
      joint - the joint to describe (not null, unaffected)
      body - one end of the joint
      forceId - true to force inclusion of the PCO native IDs, false to include them only when there's no user or application data
      Returns:
      descriptive text (not null, not empty)
    • describeJointInSpace

      public String describeJointInSpace(PhysicsJoint joint, boolean forceIds)
      Describe the specified joint in the context of a PhysicsSpace.
      Parameters:
      joint - the joint to describe (not null, unaffected)
      forceIds - true to force inclusion of PCO native IDs, false to include them only when there's no user or application data
      Returns:
      descriptive text (not null, not empty)
    • describeLinear

      public String describeLinear(SixDofJoint joint)
      Describe the linear components of the specified SixDofJoint.
      Parameters:
      joint - the joint to describe (not null, unaffected)
      Returns:
      descriptive text (not null, not empty)
    • describeUser

      public String describeUser(PhysicsCollisionObject pco)
      Describe the user of a collision object.
      Parameters:
      pco - the collision object to describe (not null, unaffected)
      Returns:
      a descriptive string (not null, may be empty)
    • clone

      Create a copy of this PhysicsDescriber.
      Overrides:
      clone in class Describer
      Returns:
      a new instance, equivalent to this one
      Throws:
      CloneNotSupportedException - if the superclass isn't cloneable