Class PhysicsMaterial

All Implemented Interfaces:
ConstJoltPhysicsObject, ConstPhysicsMaterial, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>
Direct Known Subclasses:
PhysicsMaterialSimple

public class PhysicsMaterial extends SerializableObject implements ConstPhysicsMaterial, RefTarget
Surface properties of (part of) a Shape.
  • Method Details

    • sDefault

      public static ConstPhysicsMaterial sDefault()
      Return the default material, used when a shape has no material defined.
      Returns:
      a new immutable JVM object with the pre-existing native object assigned
    • getDebugColor

      public Color getDebugColor()
      Copy the debug color. The material is unaffected.
      Specified by:
      getDebugColor in interface ConstPhysicsMaterial
      Returns:
      a new object
    • getDebugName

      public String getDebugName()
      Return the debug name. The material is unaffected.
      Specified by:
      getDebugName in interface ConstPhysicsMaterial
      Returns:
      a string of text or null
    • toRefC

      public PhysicsMaterialRefC toRefC()
      Create a counted reference to the native PhysicsMaterial.
      Specified by:
      toRefC in interface ConstPhysicsMaterial
      Returns:
      a new JVM object with a new native object assigned
    • getRefCount

      public int getRefCount()
      Count the active references to the native PhysicsMaterial. The material is unaffected.
      Specified by:
      getRefCount in interface RefTarget
      Returns:
      the count (≥0)
    • setEmbedded

      public void setEmbedded()
      Mark the native PhysicsMaterial as embedded.
      Specified by:
      setEmbedded in interface RefTarget
    • toRef

      public PhysicsMaterialRef toRef()
      Create a counted reference to the native PhysicsMaterial.
      Specified by:
      toRef in interface RefTarget
      Returns:
      a new JVM object with a new native object assigned