Package com.github.stephengold.joltjni
Class SphereShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.ConvexShapeSettings
com.github.stephengold.joltjni.SphereShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
SphereShape.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.SphereShapeSettings(float radius) Instantiate settings for the specified radius.SphereShapeSettings(float radius, ConstPhysicsMaterial material) Instantiate settings for the specified radius and material.SphereShapeSettings(SphereShapeSettings original) Instantiate a copy of the specified settings. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.ConvexShapeSettings
getDensity, getMaterial, setDensity, setMaterialMethods 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
-
Constructor Details
-
SphereShapeSettings
public SphereShapeSettings()Instantiate default settings. -
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)
-
SphereShapeSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
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
-