Package com.github.stephengold.joltjni
Class SphereShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings
,ConstJoltPhysicsObject
,ConstShapeSettings
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
SphereShape
.-
Constructor Summary
ConstructorsConstructorDescriptionSphereShapeSettings
(float radius) Instantiate settings for the specified radius.SphereShapeSettings
(float radius, ConstPhysicsMaterial material) Instantiate settings for the specified radius and material. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.ConvexShapeSettings
getDensity, getMaterial, setDensity, setMaterial
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
-
Constructor Details
-
SphereShapeSettings
public SphereShapeSettings(float radius) Instantiate settings for the specified radius.- Parameters:
radius
- the desired radius (≥0)
-
SphereShapeSettings
Instantiate settings for the specified radius and material.- Parameters:
radius
- the desired radius (≥0)material
- the desired surface properties (not null, unaffected) ornull
for default properties (default=null)
-
-
Method Details
-
getRadius
public float getRadius()Return the radius of the sphere. The settings are unaffected. (native attribute: mRadius)- Returns:
- the radius (≥0)
-
setRadius
public void setRadius(float radius) Alter the radius of the sphere. (native attribute: mRadius)- Parameters:
radius
- the desired radius
-