java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.PhysicsMaterial
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstPhysicsMaterial
,ConstSerializableObject
,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
.void
saveBinaryState
(StreamOut stream) Save the material to the specified binary stream.static ConstPhysicsMaterial
sDefault()
Return the default material, used when a shape has no material defined.void
Mark the nativePhysicsMaterial
as embedded.static PhysicsMaterialResult
sRestoreFromBinaryState
(StreamIn stream) Read a material from the specified binary stream.toRef()
Create a counted reference to the nativePhysicsMaterial
.toRefC()
Create a counted reference to the nativePhysicsMaterial
.Methods inherited from class com.github.stephengold.joltjni.SerializableObject
getRtti
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
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
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
-
sRestoreFromBinaryState
Read a material from the specified binary stream.- Parameters:
stream
- where to read objects (not null)- Returns:
- a new object
-
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
-
saveBinaryState
Save the material to the specified binary stream. The material is unaffected.- Specified by:
saveBinaryState
in interfaceConstPhysicsMaterial
- Parameters:
stream
- the stream to write to (not 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
.
-