Class Pose3d
java.lang.Object
dev.ryanhcode.sable.companion.math.Pose3d
- All Implemented Interfaces:
Pose3dc
A read-write 3D pose, consisting of a position, rotation, and scale.
- Since:
- 1.0.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPose3d()Constructs a new pose with the identity position, orientation, and scale.Constructs a new pose, copying the values from the given pose.Pose3d(org.joml.Vector3d position, org.joml.Quaterniond orientation, org.joml.Vector3d rotationPoint, org.joml.Vector3d scale) Constructs a new pose with the given position, orientation, and scale. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.ryanhcode.sable.companion.math.Pose3dc
bakeIntoMatrix, lerp, transformNormal, transformNormal, transformNormal, transformNormalInverse, transformNormalInverse, transformNormalInverse, transformPosition, transformPosition, transformPosition, transformPositionInverse, transformPositionInverse, transformPositionInverse, withinTolerance
-
Field Details
-
CODEC
-
-
Constructor Details
-
Pose3d
public Pose3d(org.joml.Vector3d position, org.joml.Quaterniond orientation, org.joml.Vector3d rotationPoint, org.joml.Vector3d scale) Constructs a new pose with the given position, orientation, and scale.- Parameters:
position- the global position of the poseorientation- the global orientation of the posescale- the global scale of the pose
-
Pose3d
public Pose3d()Constructs a new pose with the identity position, orientation, and scale. -
Pose3d
Constructs a new pose, copying the values from the given pose.
-
-
Method Details
-
set
Copies all values from the given pose into this pose.- Parameters:
pose- the pose to copy- Returns:
- this
-
lerp
Lerps this pose towards the given pose by the given amount.- Parameters:
pose- the pose to lerp towardsfrac- the amount to lerp by, 0.0 to 1.0- Returns:
- this
-
position
public org.joml.Vector3d position() -
orientation
public org.joml.Quaterniond orientation()- Specified by:
orientationin interfacePose3dc- Returns:
- the global orientation of this pose.
-
rotationPoint
public org.joml.Vector3d rotationPoint()- Specified by:
rotationPointin interfacePose3dc- Returns:
- the rotation point of this pose.
-
scale
public org.joml.Vector3d scale() -
toString
-