Package com.github.stephengold.joltjni
Class ShapeCastSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.CollideSettingsBase
com.github.stephengold.joltjni.ShapeCastSettings
- All Implemented Interfaces:
ConstCollideSettingsBase,ConstJoltPhysicsObject,ConstShapeCastSettings,AutoCloseable,Comparable<JoltPhysicsObject>
Configurable options for a shape-cast query.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings.ShapeCastSettings(ConstShapeCastSettings original) Instantiate a copy of the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionReturn the policy for back-facing triangles in convex shapes.Return the policy for back-facing triangles in triangle-based shapes.floatReturn the extra thickness for enlarging the query shape.booleanTest whether to calculate penetration for the starting point.booleanTest whether the shape should be shrunk and then expanded by the convex radius.voidset(ConstShapeCastSettings source) Copy the argument to the current settings.voidAlter the treatment of back-facing triangles in convex shapes.voidAlter the policy for back-facing triangles in triangle-based shapes.voidsetExtraConvexRadius(float margin) Alter the extra thickness for enlarging the query shape.voidsetReturnDeepestPoint(boolean enable) Alter whether to calculate penetration for the starting point.voidsetUseShrunkenShapeAndConvexRadius(boolean enable) Alter whether the shape should be shrunk and then expanded by the convex radius.Methods inherited from class com.github.stephengold.joltjni.CollideSettingsBase
getActiveEdgeMode, getActiveEdgeMovementDirection, getCollectFacesMode, getCollisionTolerance, getPenetrationTolerance, setActiveEdgeMode, setActiveEdgeMovementDirection, setCollectFacesMode, setCollisionTolerance, setPenetrationToleranceMethods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, targetVaOrZero, 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.ConstCollideSettingsBase
getActiveEdgeMode, getActiveEdgeMovementDirection, getCollectFacesMode, getCollisionTolerance, getPenetrationToleranceMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa, targetVaOrZero
-
Constructor Details
-
ShapeCastSettings
public ShapeCastSettings()Instantiate default settings. -
ShapeCastSettings
Instantiate a copy of the specified settings.- Parameters:
original- the settings to copy (notnull, unaffected)
-
-
Method Details
-
set
Copy the argument to the current settings.- Parameters:
source- the settings to copy (notnull, unaffected)
-
setBackFaceModeConvex
Alter the treatment of back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)- Parameters:
mode- the desired mode (notnull, default=IgnoreBackFaces)
-
setBackFaceModeTriangles
Alter the policy for back-facing triangles in triangle-based shapes. (native attribute: mBackFaceModeTriangles)- Parameters:
mode- the desired mode (notnull, default=IgnoreBackFaces)
-
setExtraConvexRadius
public void setExtraConvexRadius(float margin) Alter the extra thickness for enlarging the query shape. (native attribute: mExtraConvexRadius)- Parameters:
margin- the desired extra margin (default=0)
-
setReturnDeepestPoint
public void setReturnDeepestPoint(boolean enable) Alter whether to calculate penetration for the starting point. (native attribute: mReturnDeepestPoint)- Parameters:
enable-trueto enable the feature,falseto disable it (default=false)
-
setUseShrunkenShapeAndConvexRadius
public void setUseShrunkenShapeAndConvexRadius(boolean enable) Alter whether the shape should be shrunk and then expanded by the convex radius. (native attribute: mUseShrunkenShapeAndConvexRadius)- Parameters:
enable-trueto enable the feature,falseto disable it (default=false)
-
getBackFaceModeConvex
Return the policy for back-facing triangles in convex shapes. The settings are unaffected. (native attribute: mBackFaceModeConvex)- Specified by:
getBackFaceModeConvexin interfaceConstShapeCastSettings- Returns:
- the enum value (not
null)
-
getBackFaceModeTriangles
Return the policy for back-facing triangles in triangle-based shapes. The settings are unaffected. (native attribute: mBackFaceModeTriangles)- Specified by:
getBackFaceModeTrianglesin interfaceConstShapeCastSettings- Returns:
- the enum value (not
null)
-
getExtraConvexRadius
public float getExtraConvexRadius()Return the extra thickness for enlarging the query shape. The settings are unaffected. (native attribute: mExtraConvexRadius)- Specified by:
getExtraConvexRadiusin interfaceConstShapeCastSettings- Returns:
- the extra margin (in meters)
-
getReturnDeepestPoint
public boolean getReturnDeepestPoint()Test whether to calculate penetration for the starting point. The settings are unaffected. (native attribute: mReturnDeepestPoint)- Specified by:
getReturnDeepestPointin interfaceConstShapeCastSettings- Returns:
trueto enable,falseto disable
-
getUseShrunkenShapeAndConvexRadius
public boolean getUseShrunkenShapeAndConvexRadius()Test whether the shape should be shrunk and then expanded by the convex radius. The settings are unaffected. (native attribute: mUseShrunkenShapeAndConvexRadius)- Specified by:
getUseShrunkenShapeAndConvexRadiusin interfaceConstShapeCastSettings- Returns:
trueto enable,falseto disable
-