java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
CompoundShapeSettings,ConvexShapeSettings,DecoratedShapeSettings,EmptyShapeSettings,HeightFieldShapeSettings,MeshShapeSettings,PlaneShapeSettings
Settings used to construct a
Shape.-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoke this method after altering the settings but before generating any new shapes.static ShapeSettingscloneShapeSettings(ConstShapeSettings original) Instantiate a clone of the specified settings.create()Generate aShapeResultfrom these settings.intCount the active references to the nativeShapeSettings.voidMark the nativeShapeSettingsas embedded.protected final voidsetVirtualAddressAsCoOwner(long settingsVa, EShapeSubType shapeSubType) Assign a native object (assuming there's none already assigned), designate the JVM object as a co-owner, and assign a subtype.toRef()Create a counted reference to the nativeShapeSettings.toRefC()Create a counted reference to the nativeShapeSettings.Methods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, 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, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
-
Method Details
-
clearCachedResult
public void clearCachedResult()Invoke this method after altering the settings but before generating any new shapes. -
cloneShapeSettings
Instantiate a clone of the specified settings.- Parameters:
original- the settings to clone (not null, unaffected)- Returns:
- a new JVM object with a new native object assigned
-
setVirtualAddressAsCoOwner
Assign a native object (assuming there's none already assigned), designate the JVM object as a co-owner, and assign a subtype.- Parameters:
settingsVa- the virtual address of the native object to assign (not zero)shapeSubType- the desired subtype (not null)
-
create
Generate aShapeResultfrom these settings.- Specified by:
createin interfaceConstShapeSettings- Returns:
- a new JVM object with a new native object assigned
-
toRefC
Create a counted reference to the nativeShapeSettings.- Specified by:
toRefCin 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- Specified by:
getRefCountin interfaceRefTarget- Returns:
- the count (≥0)
-
setEmbedded
public void setEmbedded()Mark the nativeShapeSettingsas embedded.- Specified by:
setEmbeddedin interfaceRefTarget
-
toRef
Create a counted reference to the nativeShapeSettings.
-