Package com.github.stephengold.joltjni
Class CapsuleShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
CapsuleShape.-
Constructor Summary
ConstructorsConstructorDescriptionCapsuleShapeSettings(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. -
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, 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
-
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)
-