Package com.github.stephengold.joltjni
Class CylinderShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
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 TypeMethodDescriptionfloatReturn the convex radius.floatReturn the half height.floatReturn the radius of the cylinder.voidsetConvexRadius(float radius) Alter the convex radius.voidsetHalfHeight(float halfHeight) Alter the half height.voidsetRadius(float radius) Alter the radius of the cylinder.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
-
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)
-