Package com.github.stephengold.joltjni
Class CapsuleShapeSettings
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.CapsuleShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
CapsuleShape.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.CapsuleShapeSettings(float halfHeight, float radius) Instantiate settings for the specified dimensions.CapsuleShapeSettings(float halfHeight, float radius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material.CapsuleShapeSettings(CapsuleShapeSettings original) Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the half height of the cylindrical portion.floatReturn the radius.voidsetHalfHeightOfCylinder(float halfHeight) Alter the half height of the cylindrical portion.voidsetRadius(float radius) Alter the radius.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
-
CapsuleShapeSettings
public CapsuleShapeSettings()Instantiate default settings. -
CapsuleShapeSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
CapsuleShapeSettings
public CapsuleShapeSettings(float halfHeight, float radius) Instantiate settings for the specified dimensions.- Parameters:
halfHeight- half the desired height of the cylindrical portionradius- the desired radius
-
CapsuleShapeSettings
Instantiate settings for the specified dimensions and material.- Parameters:
halfHeight- half the desired height of the cylindrical portionradius- the desired radiusmaterial- the desired material (default=null)
-
-
Method Details
-
getHalfHeightOfCylinder
public float getHalfHeightOfCylinder()Return the half height of the cylindrical portion. The settings are unaffected. (native attribute: mHalfHeightOfCylinder)- Returns:
- half the height
-
getRadius
public float getRadius()Return the radius. The settings are unaffected. (native attribute: mRadius)- Returns:
- the radius (≥0)
-
setHalfHeightOfCylinder
public void setHalfHeightOfCylinder(float halfHeight) Alter the half height of the cylindrical portion. (native attribute: mHalfHeightOfCylinder)- Parameters:
halfHeight- one half of the desired height of the cylindrical portion (≥0)
-
setRadius
public void setRadius(float radius) Alter the radius. (native attribute: mRadius)- Parameters:
radius- the radius (≥0)
-