Package com.github.stephengold.joltjni
Class OffsetCenterOfMassShape
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.Shape
com.github.stephengold.joltjni.DecoratedShape
com.github.stephengold.joltjni.OffsetCenterOfMassShape
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstShape
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Translate the center of mass of a child shape.
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetCenterOfMassShape
(ConstShape baseShape, Vec3Arg offset) Instantiate a shape on the specified offset and base shape. -
Method Summary
Methods inherited from class com.github.stephengold.joltjni.DecoratedShape
getInnerShape
Methods 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, setEmbedded, sRestoreFromBinaryState, toRef, toRefC
Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
OffsetCenterOfMassShape
Instantiate a shape on the specified offset and base shape.- Parameters:
baseShape
- the base shape (not null)offset
- (not null, unaffected)
-
-
Method Details
-
getOffset
Copy the shape's offset relative to the base shape. The shape is unaffected.- Returns:
- a new, mutable offset vector
-