Package com.github.stephengold.joltjni
Class PhysicsMaterialRef
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.PhysicsMaterialRef
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
A counted reference to a
PhysicsMaterial
. (native type:
Ref<PhysicsMaterial>
)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPtr()
Temporarily access the referencedPhysicsMaterial
.Temporarily access the referenced material, assuming it is aPhysicsMaterialSimple
.long
targetVa()
Return the address of the nativePhysicsMaterial
.toRef()
Create another counted reference to the nativePhysicsMaterial
.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, toString, va
-
Constructor Details
-
PhysicsMaterialRef
public PhysicsMaterialRef()Instantiate an empty reference.
-
-
Method Details
-
getPtrAsSimple
Temporarily access the referenced material, assuming it is aPhysicsMaterialSimple
.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getPtr
Temporarily access the referencedPhysicsMaterial
. -
targetVa
public long targetVa()Return the address of the nativePhysicsMaterial
. No objects are affected.- Specified by:
targetVa
in interfaceConstJoltPhysicsObject
- Overrides:
targetVa
in classJoltPhysicsObject
- Returns:
- a virtual address (not zero)
-
toRef
Create another counted reference to the nativePhysicsMaterial
.
-