Package com.github.stephengold.joltjni
Class TaperedCylinderShapeSettings
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.TaperedCylinderShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings
,ConstJoltPhysicsObject
,ConstShapeSettings
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
TaperedCylinderShape
.-
Constructor Summary
ConstructorsConstructorDescriptionTaperedCylinderShapeSettings
(float halfHeight, float topRadius, float bottomRadius) Instantiate settings for the specified dimensions.TaperedCylinderShapeSettings
(float halfHeight, float topRadius, float bottomRadius, float convexRadius) Instantiate settings for the specified dimensions.TaperedCylinderShapeSettings
(float halfHeight, float topRadius, float bottomRadius, float convexRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the bottom radius.float
Return the convex radius.float
Return the half height.float
Return the top radius.void
setBottomRadius
(float radius) Alter the bottom radius.void
setConvexRadius
(float radius) Alter the convex radius.void
setHalfHeight
(float halfHeight) Alter the half height.void
setTopRadius
(float radius) Alter the top radius.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
-
TaperedCylinderShapeSettings
public TaperedCylinderShapeSettings(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 radius of the tapered cylinderbottomRadius
- the desired bottom radius of the tapered cylinder
-
TaperedCylinderShapeSettings
public TaperedCylinderShapeSettings(float halfHeight, float topRadius, float bottomRadius, float convexRadius) Instantiate settings for the specified dimensions.- Parameters:
halfHeight
- half the desired height of the tapered cylindertopRadius
- the desired top radius of the tapered cylinderbottomRadius
- the desired bottom radius of the tapered cylinderconvexRadius
- the desired convex radius (default=0.05)
-
TaperedCylinderShapeSettings
public TaperedCylinderShapeSettings(float halfHeight, float topRadius, float bottomRadius, float convexRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material.- Parameters:
halfHeight
- half the desired height of the tapered cylindertopRadius
- the desired top radius of the tapered cylinderbottomRadius
- the desired bottom radius of the tapered cylinderconvexRadius
- the desired convex radius (default=0.05)material
- the desired material (default=null)
-
-
Method Details
-
getBottomRadius
public float getBottomRadius()Return the bottom radius. The settings are unaffected. (native attribute: mRadius)- Returns:
- the bottom radius of the tapered cylinder (≥0)
-
getConvexRadius
public float getConvexRadius()Return the convex radius. The settings are unaffected. (native attribute: mConvexRadius)- Returns:
- the convex radius (≥0)
-
getHalfHeight
public float getHalfHeight()Return the half height. The settings are unaffected. (native attribute: mHalfHeight)- Returns:
- half the height
-
getTopRadius
public float getTopRadius()Return the top radius. The settings are unaffected. (native attribute: mTopRadius)- Returns:
- the top radius (≥0)
-
setBottomRadius
public void setBottomRadius(float radius) Alter the bottom radius. (native attribute: mBottomRadius)- Parameters:
radius
- the desired bottom radius (≥0)
-
setConvexRadius
public void setConvexRadius(float radius) Alter the convex radius. (native attribute: mConvexRadius)- Parameters:
radius
- the desired convex radius (≥0, default=0.05)
-
setHalfHeight
public void setHalfHeight(float halfHeight) Alter the half height. (native attribute: mHalfHeight)- Parameters:
halfHeight
- one half of the desired height (≥0)
-
setTopRadius
public void setTopRadius(float radius) Alter the top radius. (native attribute: mTopRadius)- Parameters:
radius
- the desired top radius (≥0)
-