Package com.github.stephengold.joltjni
Class SphereShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
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, setMaterialMethods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, create, getRefCount, setEmbedded, toRefMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, hasAssignedNativeObject, hashCode, ownsNativeObject, 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, va
-
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) ornullfor 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
-