Package com.github.stephengold.joltjni
Class TriangleShapeSettings
- All Implemented Interfaces:
ConstConvexShapeSettings,ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
TriangleShape.-
Constructor Summary
ConstructorsConstructorDescriptionTriangleShapeSettings(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3) Instantiate settings for the specified vertices.TriangleShapeSettings(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3, float convexRadius) Instantiate settings for the specified vertices. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the convex radius.voidsetConvexRadius(float radius) Alter the convex radius.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
-
TriangleShapeSettings
Instantiate settings for the specified vertices.- Parameters:
v1- the location of the first vertex (not null, unaffected)v2- the location of the 2nd vertex (not null, unaffected)v3- the location of the 3rd vertex (not null, unaffected)
-
TriangleShapeSettings
Instantiate settings for the specified vertices.- Parameters:
v1- the location of the first vertex (not null, unaffected)v2- the location of the 2nd vertex (not null, unaffected)v3- the location of the 3rd vertex (not null, unaffected)convexRadius- the desired convex radius (default=0)
-
-
Method Details
-
getConvexRadius
public float getConvexRadius()Return the convex radius. The settings are unaffected. (native attribute: mConvexRadius)- Returns:
- the convex radius (≥0)
-
setConvexRadius
public void setConvexRadius(float radius) Alter the convex radius. (native attribute: mConvexRadius)- Parameters:
radius- the desired convex radius (≥0)
-