Package com.github.stephengold.joltjni
Class CylinderShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.ConvexShapeSettings
com.github.stephengold.joltjni.CylinderShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,ConstSerializableObject,ConstShapeSettings,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
Settings used to construct a
CylinderShape.-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.CylinderShapeSettings(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.CylinderShapeSettings(CylinderShapeSettings original) Instantiate a copy of the specified settings. -
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, cloneShapeSettings, create, getRefCount, setEmbedded, setVirtualAddressAsCoOwner, toRef, toRefCMethods inherited from class com.github.stephengold.joltjni.SerializableObject
getRttiMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, 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, targetVaMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstSerializableObject
getRttiMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstShapeSettings
create, getRefCount, toRefC
-
Constructor Details
-
CylinderShapeSettings
public CylinderShapeSettings()Instantiate default settings. -
CylinderShapeSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
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)
-