java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Shape
com.github.stephengold.joltjni.ConvexShape
com.github.stephengold.joltjni.CylinderShape
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstShape
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
A
Shape
to represent a Y-axis right circular cylinder.-
Constructor Summary
ConstructorsConstructorDescriptionCylinderShape
(float halfHeight, float radius) Instantiate a shape with the specified dimensions.CylinderShape
(float halfHeight, float radius, float convexRadius) Instantiate a shape with the specified dimensions and convex radius. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the convex radius.float
Return the half height.float
Return the radius.Methods inherited from class com.github.stephengold.joltjni.ConvexShape
getDensity, getSupportFunction, setDensity
Methods inherited from class com.github.stephengold.joltjni.Shape
copyDebugTriangles, countDebugTriangles, draw, drawGetSupportFunction, getCenterOfMass, getInnerRadius, getLeafShape, getLocalBounds, getMassProperties, getMaterial, getRefCount, getRevisionCount, getStats, getSubShapeIdBitsRecursive, getSubType, getType, getWorldSpaceBounds, getWorldSpaceBounds, isValidScale, makeScaleValid, mustBeStatic, saveBinaryState, setEmbedded, sRestoreFromBinaryState, 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
-
CylinderShape
public CylinderShape(float halfHeight, float radius) Instantiate a shape with the specified dimensions.- Parameters:
halfHeight
- half the desired height (local Y axis)radius
- the desired radius (local X and Z axes)
-
CylinderShape
public CylinderShape(float halfHeight, float radius, float convexRadius) Instantiate a shape with the specified dimensions and convex radius.- Parameters:
halfHeight
- half the desired height (local Y axis)radius
- the desired radius (local X and Z axes)convexRadius
- the desired convex radius (default=0.05)
-
-
Method Details
-
getConvexRadius
public float getConvexRadius()Return the convex radius. The shape is unaffected.- Returns:
- the radius (≥0)
-
getHalfHeight
public float getHalfHeight()Return the half height. The shape is unaffected.- Returns:
- 1/2 of the height (≥0)
-
getRadius
public float getRadius()Return the radius. The shape is unaffected.- Returns:
- the radius (≥0)
-