java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.template.Ref
com.github.stephengold.joltjni.ShapeSettingsRef
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,AutoCloseable,Comparable<JoltPhysicsObject>
A counted reference to a
ShapeSettings. (native type:
Ref<ShapeSettings>)-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Generate aShapeResultfrom the referencedShapeSettings.getPtr()Access the targeted settings, if any.intCount the active references to the nativeShapeSettings.getRtti()Access the type information of the current object.longtargetVa()Return the address of the nativeShapeSettings.toRef()Create an additional counted reference to the targeted settings.toRefC()Create a read-only counted reference to the targeted settings.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject
-
Constructor Details
-
ShapeSettingsRef
public ShapeSettingsRef()Instantiate an empty reference.
-
-
Method Details
-
create
Generate aShapeResultfrom the referencedShapeSettings.- Specified by:
createin interfaceConstShapeSettings- Returns:
- a new JVM object with a new native object assigned
-
getRefCount
public int getRefCount()Count the active references to the nativeShapeSettings. The settings are unaffected.- Specified by:
getRefCountin interfaceConstShapeSettings- Returns:
- the count (≥0)
-
getRtti
Access the type information of the current object. (native function: getRTTI)- Specified by:
getRttiin interfaceConstSerializableObject- Returns:
- a new JVM object with the pre-existing native object assigned
-
toRefC
Create a read-only counted reference to the targeted settings.- Specified by:
toRefCin interfaceConstShapeSettings- Returns:
- a new JVM object with a new native object assigned
-
getPtr
Access the targeted settings, if any. -
targetVa
public long targetVa()Return the address of the nativeShapeSettings. No objects are affected.- Specified by:
targetVain interfaceConstJoltPhysicsObject- Overrides:
targetVain classJoltPhysicsObject- Returns:
- the virtual address, or zero if the reference is empty
-
toRef
Create an additional counted reference to the targeted settings.
-