java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Shape
com.github.stephengold.joltjni.ConvexShape
com.github.stephengold.joltjni.TriangleShape
- All Implemented Interfaces:
ConstConvexShape,ConstJoltPhysicsObject,ConstShape,RefTarget,AutoCloseable,Comparable<JoltPhysicsObject>
A
Shape to represent a single triangle.-
Constructor Summary
ConstructorsConstructorDescriptionTriangleShape(float v1x, float v1y, float v1z, float v2x, float v2y, float v2z, float v3x, float v3y, float v3z, float convexRadius) Instantiate a shape with the specified vertices and convex radius.TriangleShape(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3) Instantiate a shape with the specified vertices.TriangleShape(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3, float convexRadius) Instantiate a shape with the specified vertices and convex radius. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.ConvexShape
getDensity, getSubmergedVolume, getSupportFunction, setDensityMethods inherited from class com.github.stephengold.joltjni.Shape
copyDebugTriangles, countDebugTriangles, draw, drawGetSupportFunction, getCenterOfMass, getInnerRadius, getLeafShape, getLocalBounds, getMassProperties, getMaterial, getRefCount, getRevisionCount, getStats, getSubShapeIdBitsRecursive, getSubType, getType, getWorldSpaceBounds, getWorldSpaceBounds, isValidScale, makeScaleValid, mustBeStatic, saveBinaryState, scaleShape, setEmbedded, setVirtualAddressAsCoOwner, sRestoreFromBinaryState, toRef, toRefCMethods 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.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa, targetVaOrZeroMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstShape
copyDebugTriangles, countDebugTriangles, draw, drawGetSupportFunction, getCenterOfMass, getInnerRadius, getLeafShape, getLocalBounds, getMassProperties, getMaterial, getRefCount, getRevisionCount, getStats, getSubShapeIdBitsRecursive, getSubType, getType, getWorldSpaceBounds, getWorldSpaceBounds, isValidScale, makeScaleValid, mustBeStatic, saveBinaryState, scaleShape, toRefC
-
Constructor Details
-
TriangleShape
public TriangleShape(float v1x, float v1y, float v1z, float v2x, float v2y, float v2z, float v3x, float v3y, float v3z, float convexRadius) Instantiate a shape with the specified vertices and convex radius.- Parameters:
v1x- the X coordinate of the first vertexv1y- the Y coordinate of the first vertexv1z- the Z coordinate of the first vertexv2x- the X coordinate of the 2nd vertexv2y- the Y coordinate of the 2nd vertexv2z- the Z coordinate of the 2nd vertexv3x- the X coordinate of the 3rd vertexv3y- the Y coordinate of the 3rd vertexv3z- the Z coordinate of the 3rd vertexconvexRadius- the desired convex radius (default=0)
-
TriangleShape
Instantiate a shape with 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)
-
TriangleShape
Instantiate a shape with the specified vertices and convex radius.- 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 shape is unaffected.- Returns:
- the radius (≥0)
-