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:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
Configurable options for a shape-cast query.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the treatment of back-facing triangles in convex shapes.Return the treatment of back-facing triangles in triangle-based shapes.boolean
Test whether to calculate penetration for the starting point.boolean
Test whether the shape should be shrunk and then expanded by the convex radius.void
Alter the treatment of back-facing triangles in convex shapes.void
Alter the treatment of back-facing triangles in triangle-based shapes.void
setReturnDeepestPoint
(boolean enable) Alter whether to calculate penetration for the starting point.void
setUseShrunkenShapeAndConvexRadius
(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, setPenetrationTolerance
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
ShapeCastSettings
public ShapeCastSettings()Instantiate default settings.
-
-
Method Details
-
getBackFaceModeConvex
Return the treatment of back-facing triangles in convex shapes. The settings are unaffected. (native attribute: mBackFaceModeConvex)- Returns:
- the enum value (not null)
-
getBackFaceModeTriangles
Return the treatment of back-facing triangles in triangle-based shapes. The settings are unaffected. (native attribute: mBackFaceModeTriangles)- Returns:
- the enum value (not null)
-
getReturnDeepestPoint
public boolean getReturnDeepestPoint()Test whether to calculate penetration for the starting point. The settings are unaffected. (native attribute: mReturnDeepestPoint)- Returns:
true
to enable,false
to 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)- Returns:
true
to enable,false
to disable
-
setBackFaceModeConvex
Alter the treatment of back-facing triangles in convex shapes. (native attribute: mBackFaceModeConvex)- Parameters:
mode
- the desired mode (not null, default=IgnoreBackFaces)
-
setBackFaceModeTriangles
Alter the treatment of back-facing triangles in triangle-based shapes. (native attribute: mBackFaceModeTriangles)- Parameters:
mode
- the desired mode (not null, default=IgnoreBackFaces)
-
setReturnDeepestPoint
public void setReturnDeepestPoint(boolean enable) Alter whether to calculate penetration for the starting point. (native attribute: mReturnDeepestPoint)- Parameters:
enable
-true
to enable the feature,false
to 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
-true
to enable the feature,false
to disable it (default=false)
-