Package com.github.stephengold.joltjni
Class CylinderShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings
,ConstJoltPhysicsObject
,ConstShapeSettings
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Settings used to construct a
CylinderShape
.-
Constructor Summary
ConstructorsConstructorDescriptionCylinderShapeSettings
(float halfHeight, float radius) Instantiate settings for the specified dimensions.CylinderShapeSettings
(float halfHeight, float radius, float convexRadius) Instantiate settings for the specified dimensions.CylinderShapeSettings
(float halfHeight, float radius, float convexRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Return the convex radius.float
Return the half height.float
Return the radius of the cylinder.void
setConvexRadius
(float radius) Alter the convex radius.void
setHalfHeight
(float halfHeight) Alter the half height.void
setRadius
(float radius) Alter the 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
-
CylinderShapeSettings
public CylinderShapeSettings(float halfHeight, float radius) Instantiate settings for the specified dimensions.- Parameters:
halfHeight
- half the desired heightradius
- the desired radius of the cylinder
-
CylinderShapeSettings
public CylinderShapeSettings(float halfHeight, float radius, float convexRadius) Instantiate settings for the specified dimensions.- Parameters:
halfHeight
- half the desired height of the cylinderradius
- the desired radius of the cylinderconvexRadius
- the desired convex radius (default=0.05)
-
CylinderShapeSettings
public CylinderShapeSettings(float halfHeight, float radius, float convexRadius, PhysicsMaterial material) Instantiate settings for the specified dimensions and material.- Parameters:
halfHeight
- half the desired height of the cylinderradius
- the desired radius of the cylinderconvexRadius
- the desired convex radius (default=0.05)material
- the desired material (default=null)
-
-
Method Details
-
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
-
getRadius
public float getRadius()Return the radius of the cylinder. The settings are unaffected. (native attribute: mRadius)- Returns:
- the 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)
-
setRadius
public void setRadius(float radius) Alter the radius of the cylinder. (native attribute: mRadius)- Parameters:
radius
- the desired radius (≥0)
-