Package com.github.stephengold.joltjni
Class ConvexShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.ConvexShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings
,ConstJoltPhysicsObject
,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 TypeMethodDescriptionfloat
Return the density.Return the material.void
setDensity
(float density) Alter the shape's density.void
setMaterial
(ConstPhysicsMaterial material) Replace the material.Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, create, getRefCount, setEmbedded, toRef, toRefC
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
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, ornull
for none (default=null)
-
getDensity
public float getDensity()Return the density. The settings are unaffected. (native attribute: mDensity)- Specified by:
getDensity
in interfaceConstConvexShapeSettings
- Returns:
- the value
-
getMaterial
Return the material. The settings are unaffected. (native attribute: mMaterial)- Specified by:
getMaterial
in interfaceConstConvexShapeSettings
- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if none
-