Package com.github.stephengold.joltjni
Class TaperedCapsuleShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.ConvexShapeSettings
com.github.stephengold.joltjni.TaperedCapsuleShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings
,ConstJoltPhysicsObject
,ConstShapeSettings
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
TaperedCylinderShape
.-
Constructor Summary
ConstructorsConstructorDescriptionTaperedCapsuleShapeSettings
(float halfHeight, float topRadius, float bottomRadius) Instantiate settings for the specified dimensions.TaperedCapsuleShapeSettings
(float halfHeight, float topRadius, float bottomRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the bottom radius of the cylinder.float
Return the half height of the tapered cylinder.float
Return the top radius of the cylinder.void
setBottomRadius
(float radius) Alter the bottom radius of the cylinder.void
setHalfHeightOfTaperedCylinder
(float halfHeight) Alter the half height of the tapered cylinder.void
setTopRadius
(float radius) Alter the top radius of the cylinder.Methods inherited from class com.github.stephengold.joltjni.ConvexShapeSettings
getDensity, getMaterial, setDensity, setMaterial
Methods inherited from class com.github.stephengold.joltjni.ShapeSettings
clearCachedResult, create, getRefCount, setEmbedded, toRef, toRefC
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, 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
-
Constructor Details
-
TaperedCapsuleShapeSettings
public TaperedCapsuleShapeSettings(float halfHeight, float topRadius, float bottomRadius) Instantiate settings for the specified dimensions.- Parameters:
halfHeight
- half the desired height of the tapered cylindertopRadius
- the desired top radiusbottomRadius
- the desired bottom radius
-
TaperedCapsuleShapeSettings
public TaperedCapsuleShapeSettings(float halfHeight, float topRadius, float bottomRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material.- Parameters:
halfHeight
- half the desired height of the tapered cylindertopRadius
- the desired top radiusbottomRadius
- the desired bottom radiusmaterial
- the desired material (default=null)
-
-
Method Details
-
getBottomRadius
public float getBottomRadius()Return the bottom radius of the cylinder. The settings are unaffected. (native attribute: mBottomRadius)- Returns:
- the bottom radius (≥0)
-
getHalfHeightOfTaperedCylinder
public float getHalfHeightOfTaperedCylinder()Return the half height of the tapered cylinder. The settings are unaffected. (native attribute: mHalfHeightOfTaperedCylinder)- Returns:
- half the height
-
getTopRadius
public float getTopRadius()Return the top radius of the cylinder. The settings are unaffected. (native attribute: mTopRadius)- Returns:
- the top radius (≥0)
-
setBottomRadius
public void setBottomRadius(float radius) Alter the bottom radius of the cylinder. (native attribute: mBottomRadius)- Parameters:
radius
- the desired bottom radius (≥0)
-
setHalfHeightOfTaperedCylinder
public void setHalfHeightOfTaperedCylinder(float halfHeight) Alter the half height of the tapered cylinder. (native attribute: mHalfHeightOfTaperedCylinder)- Parameters:
halfHeight
- one half of the desired height (≥0)
-
setTopRadius
public void setTopRadius(float radius) Alter the top radius of the cylinder. (native attribute: mTopRadius)- Parameters:
radius
- the desired top radius (≥0)
-