Package com.github.stephengold.joltjni
Class ConvexHullShapeSettings
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.ConvexHullShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
ConvexHullShape.-
Constructor Summary
ConstructorsConstructorDescriptionConvexHullShapeSettings(int numPoints, FloatBuffer points) Instantiate settings for the points in the specified buffer.ConvexHullShapeSettings(int numPoints, FloatBuffer points, float maxConvexRadius) Instantiate settings for the specified parameters.ConvexHullShapeSettings(int numPoints, FloatBuffer points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters.ConvexHullShapeSettings(Vec3Arg... points) Instantiate settings for the specified points.ConvexHullShapeSettings(Vec3Arg[] points, float maxConvexRadius) Instantiate settings for the specified parameters.ConvexHullShapeSettings(Vec3Arg[] points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters.ConvexHullShapeSettings(List<Vec3Arg> points) Instantiate settings for the specified list of points.ConvexHullShapeSettings(List<Vec3Arg> points, float maxConvexRadius) Instantiate settings for the specified parameters.ConvexHullShapeSettings(List<Vec3Arg> points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionintCount the points to use when creating the hull.floatReturn the positional tolerance used when generating the hull.floatReturn the convex radius.floatReturn the maximum separation between the shrunk hull + convex radius and the actual hull.voidsetHullTolerance(float tolerance) Alter the positional tolerance used when generating generate the hull.voidsetMaxConvexRadius(float radius) Alter the convex radius.voidsetMaxErrorConvexRadius(float maxError) Alter the maximum separation between the shrunk hull plus convex radius and the actual hull.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
-
ConvexHullShapeSettings
Instantiate settings for the specified list of points.- Parameters:
points- a list of point locations (not null, unaffected)
-
ConvexHullShapeSettings
Instantiate settings for the specified parameters.- Parameters:
points- a list of point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)
-
ConvexHullShapeSettings
public ConvexHullShapeSettings(List<Vec3Arg> points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters.- Parameters:
points- a list of point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)material- the desired surface properties (not null, unaffected) ornullfor default properties (default=null)
-
ConvexHullShapeSettings
Instantiate settings for the specified points.- Parameters:
points- an array of point locations (not null, unaffected)
-
ConvexHullShapeSettings
Instantiate settings for the specified parameters.- Parameters:
points- an array of point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)
-
ConvexHullShapeSettings
public ConvexHullShapeSettings(Vec3Arg[] points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters.- Parameters:
points- an array of point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)material- the desired surface properties (not null, unaffected) ornullfor default properties (default=null)
-
ConvexHullShapeSettings
Instantiate settings for the points in the specified buffer.- Parameters:
numPoints- the number of points (≥0)points- a direct buffer containing point locations (not null, unaffected)
-
ConvexHullShapeSettings
Instantiate settings for the specified parameters.- Parameters:
numPoints- the number of points (≥0)points- a direct buffer containing point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)
-
ConvexHullShapeSettings
public ConvexHullShapeSettings(int numPoints, FloatBuffer points, float maxConvexRadius, ConstPhysicsMaterial material) Instantiate settings for the specified parameters.- Parameters:
numPoints- the number of points (≥0)points- a direct buffer containing point locations (not null, unaffected)maxConvexRadius- the desired maximum convex radius (≥0, default=0.05)material- the desired surface properties (not null, unaffected) ornullfor default properties (default=null)
-
-
Method Details
-
countPoints
public int countPoints()Count the points to use when creating the hull. The settings are unaffected.- Returns:
- the count (≥0)
-
getHullTolerance
public float getHullTolerance()Return the positional tolerance used when generating the hull. The settings are unaffected. (native attribute: mHullTolerance)- Returns:
- the distance (≥0)
-
getMaxConvexRadius
public float getMaxConvexRadius()Return the convex radius. The settings are unaffected. (native attribute: mMaxConvexRadius)- Returns:
- the convex radius (≥0)
-
getMaxErrorConvexRadius
public float getMaxErrorConvexRadius()Return the maximum separation between the shrunk hull + convex radius and the actual hull. The settings are unaffected. (native attribute: mMaxErrorConvexRadius)- Returns:
- the maximum separation (≥0)
-
setHullTolerance
public void setHullTolerance(float tolerance) Alter the positional tolerance used when generating generate the hull. (native attribute: mHullTolerance)- Parameters:
tolerance- the desired tolerance (≥0, default=0.001)
-
setMaxConvexRadius
public void setMaxConvexRadius(float radius) Alter the convex radius. (native attribute: mMaxConvexRadius)- Parameters:
radius- the desired convex radius (≥0, default=0)
-
setMaxErrorConvexRadius
public void setMaxErrorConvexRadius(float maxError) Alter the maximum separation between the shrunk hull plus convex radius and the actual hull. (native attribute: mMaxErrorConvexRadius)- Parameters:
maxError- the desired maximum separation (≥0, default=0.05)
-