Package com.github.stephengold.joltjni
Class ShapeSettingsRefC
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.ShapeSettingsRefC
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,AutoCloseable,Comparable<JoltPhysicsObject>
A counted reference to a
ConstShapeSettings. (native type:
RefConst<ShapeSettings>)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Generate aShapeResultfrom these settings.getPtr()Access the targeted settings, if any.intCount the active references to the nativeShapeSettings.getRtti()Access the run-time type information of the current object.longtargetVa()Return the address of the native settings.longReturn the address of the native settings.toRefC()Create another 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
-
ShapeSettingsRefC
public ShapeSettingsRefC()Instantiate an empty reference.
-
-
Method Details
-
getPtr
Access the targeted settings, if any.- Returns:
- the pre-existing object, or
nullif the reference is empty
-
create
Generate aShapeResultfrom these settings.- 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 run-time type information of the current object.- Specified by:
getRttiin interfaceConstSerializableObject- Returns:
- a new object
-
toRefC
Create another read-only counted reference to the targeted settings.- Specified by:
toRefCin interfaceConstShapeSettings- Returns:
- a new JVM object with a new native object assigned
-
targetVa
public long targetVa()Return the address of the native settings. The reference is assumed to be non-empty. No objects are affected.- Specified by:
targetVain interfaceConstJoltPhysicsObject- Overrides:
targetVain classJoltPhysicsObject- Returns:
- the virtual address (not zero)
-
targetVaOrZero
public long targetVaOrZero()Return the address of the native settings. No objects are affected.- Specified by:
targetVaOrZeroin interfaceConstJoltPhysicsObject- Overrides:
targetVaOrZeroin classJoltPhysicsObject- Returns:
- the virtual address, or zero if the reference is empty
-