Package com.github.stephengold.joltjni
Class RotatedTranslatedShapeSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.SerializableObject
com.github.stephengold.joltjni.ShapeSettings
com.github.stephengold.joltjni.DecoratedShapeSettings
com.github.stephengold.joltjni.RotatedTranslatedShapeSettings
- All Implemented Interfaces:
ConstJoltPhysicsObject,RefTarget,AutoCloseable,Comparable<ConstJoltPhysicsObject>
Settings used to construct a
RotatedTranslatedShape.-
Constructor Summary
ConstructorsConstructorDescriptionRotatedTranslatedShapeSettings(Vec3Arg offset, QuatArg rotation, ConstShape baseShape) Instantiate a settings object with the specified offset, rotation, and base shape.RotatedTranslatedShapeSettings(Vec3Arg offset, QuatArg rotation, ShapeRefC baseShapeRef) Instantiate a settings object with the specified offset, rotation, and base shape. -
Method Summary
Modifier and TypeMethodDescriptionCopy the offset relative to the base shape.Copy the rotation relative to the base shape.voidsetPosition(Vec3Arg offset) Alter the offset relative to the base shape.voidsetRotation(QuatArg rotation) Alter the rotation relative to the base shape.Methods 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, va
-
Constructor Details
-
RotatedTranslatedShapeSettings
Instantiate a settings object with the specified offset, rotation, and base shape.- Parameters:
offset- (not null, unaffected)rotation- (not null, not zero, unaffected)baseShape- the base shape (not null, unaffected)
-
RotatedTranslatedShapeSettings
Instantiate a settings object with the specified offset, rotation, and base shape.- Parameters:
offset- (not null, unaffected)rotation- (not null, not zero, unaffected)baseShapeRef- a reference to the base shape (not null)
-
-
Method Details
-
getPosition
Copy the offset relative to the base shape. The settings are unaffected. (native attribute: mPosition)- Returns:
- a new, mutable offset vector
-
getRotation
Copy the rotation relative to the base shape. The settings are unaffected. (native attribute: mRotation)- Returns:
- a new, mutable rotation quaternion
-
setPosition
Alter the offset relative to the base shape. (native attribute: mPosition)- Parameters:
offset- the desired offset vector (not null, unaffected, default=(0,0,0))
-
setRotation
Alter the rotation relative to the base shape. (native attribute: mRotation)- Parameters:
rotation- the desired rotation quaternion (not null, unaffected)
-