Package com.github.stephengold.joltjni
Class RotatedTranslatedShape
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.RotatedTranslatedShape
- All Implemented Interfaces:
ConstJoltPhysicsObject
,ConstShape
,RefTarget
,AutoCloseable
,Comparable<JoltPhysicsObject>
Apply rotation followed by translation to an existing
Shape
to create
a new shape.-
Constructor Summary
ConstructorsConstructorDescriptionRotatedTranslatedShape
(Vec3Arg offset, QuatArg rotation, ConstShape baseShape) Instantiate a shape on the specified offset, rotation, and base shape. -
Method Summary
Modifier and TypeMethodDescriptionCopy the shape's offset relative to the base shape.Copy the shape's rotation relative to the base shape.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
-
RotatedTranslatedShape
Instantiate a shape on the specified offset, rotation, and base shape.- Parameters:
offset
- (not null, unaffected)rotation
- (not null, not zero, unaffected)baseShape
- the base shape (not null)
-
-
Method Details
-
getPosition
Copy the shape's offset relative to the base shape. The shape is unaffected.- Returns:
- a new, mutable offset vector
-
getRotation
Copy the shape's rotation relative to the base shape. The shape is unaffected.- Returns:
- a new, mutable rotation quaternion
-