Interface ConstConvexShape
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject,ConstShape
- All Known Implementing Classes:
BoxShape,CapsuleShape,ConvexHullShape,ConvexShape,CylinderShape,SphereShape,TaperedCapsuleShape,TaperedCylinderShape,TriangleShape
Read-only access to a
ConvexShape. (native type: const ConvexShape)-
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the density.voidgetSubmergedVolume(Mat44Arg comTransform, Vec3Arg scale, ConstPlane surface, float[] storeTotalVolume, float[] storeSubmergedVolume, Vec3 storeCenterOfBuoyancy, RVec3Arg baseOffset) Calculate the shape's volume, submerged volume, and center of buoyancy.getSupportFunction(ESupportMode supportMode, SupportBuffer buffer, Vec3Arg scale) Generate a support function for the shape.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVaMethods 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
-
Method Details
-
getDensity
float getDensity()Return the density.- Returns:
- the density
-
getSubmergedVolume
void getSubmergedVolume(Mat44Arg comTransform, Vec3Arg scale, ConstPlane surface, float[] storeTotalVolume, float[] storeSubmergedVolume, Vec3 storeCenterOfBuoyancy, RVec3Arg baseOffset) Calculate the shape's volume, submerged volume, and center of buoyancy.- Parameters:
comTransform- the local-to-system transform (not null, unaffected)scale- the scale vector (not null, unaffected)surface- the boundary of the submerged region (not null, unaffected)storeTotalVolume- storage for the total volume, ornullstoreSubmergedVolume- storage for the submerged volume, ornullstoreCenterOfBuoyancy- storage for the center of buoyancy, ornullbaseOffset- the base offset to use (ignored if the native library doesn't implement debug rendering)
-
getSupportFunction
Generate a support function for the shape.- Parameters:
supportMode- how to handle convex radius (not null)buffer- buffer storage (not null)scale- scale factors to apply (in local coordinates, not null, unaffected)- Returns:
- a new JVM object with the pre-existing native object assigned
-