java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.PhysicsMaterial
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstPhysicsMaterial
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
PhysicsMaterialSimple
Surface properties of (part of) a
Shape
.-
Method Summary
Modifier and TypeMethodDescriptionCopy the debug color.Return the debug name.int
Count the active references to the nativePhysicsMaterial
.static ConstPhysicsMaterial
sDefault()
Return the default material, used when a shape has no material defined.void
Mark the nativePhysicsMaterial
as embedded.toRef()
Create a counted reference to the nativePhysicsMaterial
.toRefC()
Create a counted reference to the nativePhysicsMaterial
.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
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
Copy the debug color. The material is unaffected.- Specified by:
getDebugColor
in interfaceConstPhysicsMaterial
- Returns:
- a new object
-
getDebugName
Return the debug name. The material is unaffected.- Specified by:
getDebugName
in interfaceConstPhysicsMaterial
- Returns:
- a string of text or
null
-
toRefC
Create a counted reference to the nativePhysicsMaterial
.- Specified by:
toRefC
in interfaceConstPhysicsMaterial
- Returns:
- a new JVM object with a new native object assigned
-
getRefCount
public int getRefCount()Count the active references to the nativePhysicsMaterial
. The material is unaffected.- Specified by:
getRefCount
in interfaceRefTarget
- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativePhysicsMaterial
as embedded.- Specified by:
setEmbedded
in interfaceRefTarget
-
toRef
Create a counted reference to the nativePhysicsMaterial
.
-