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, setMaterial
Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, cloneShapeSettings, create, getRefCount, setEmbedded, toRef, toRefC
Methods inherited from class com.github.stephengold.joltjni.SerializableObject
getRtti
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, 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
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRtti
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstShapeSettings
create, 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) ornull
for 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
-