Package com.github.stephengold.joltjni
Class ConvexShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.ConvexShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
BoxShapeSettings,CapsuleShapeSettings,ConvexHullShapeSettings,CylinderShapeSettings,SphereShapeSettings,TaperedCapsuleShapeSettings,TaperedCylinderShapeSettings,TriangleShapeSettings
Settings used to construct a
ConvexShape.-
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the density.Return the material.voidsetDensity(float density) Alter the shape's density.voidsetMaterial(ConstPhysicsMaterial material) Replace the material.Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, cloneShapeSettings, create, getRefCount, setEmbedded, setVirtualAddressAsCoOwner, toRef, toRefCMethods 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
getRttiMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstShapeSettings
create, getRefCount, toRefC
-
Method Details
-
setDensity
public void setDensity(float density) Alter the shape's density.- Parameters:
density- the desired density (in kilograms per cubic meter, default=1000)
-
setMaterial
Replace the material. (native attribute: mMaterial)- Parameters:
material- the desired material, ornullfor none (default=null)
-
getDensity
public float getDensity()Return the density. The settings are unaffected. (native attribute: mDensity)- Specified by:
getDensityin interfaceConstConvexShapeSettings- Returns:
- the value
-
getMaterial
Return the material. The settings are unaffected. (native attribute: mMaterial)- Specified by:
getMaterialin interfaceConstConvexShapeSettings- Returns:
- a new JVM object with the pre-existing native object assigned, or
nullif none
-