A 6-degree-freedom pose (3D position and 3D rotation). See Tait–Bryan angles: z-y'-x"
class Pose
import {Pose} from '@math.gl/core';
Gets or sets position components respectively
Gets or sets rotation components respectively
new Pose({x, y, z, roll, pitch, yaw});
new Pose({position, orientation});
x
, y
, z
- positionroll
, pitch
, yaw
- rotation in radiansposition
- Vector3
or array of 3 that represents the positionorientation
- Euler
or array of 4 that represents the rotationpose.getPosition()
Returns Vector3
.
pose.getOrientation()
Returns Euler
.
pose.equals(otherPose)
pose.exactEquals(otherPose)
pose.getTransformationMatrix()
Returns a 4x4 matrix that transforms a coordinates (in the same coordinate system as this pose) into the "pose-relative" coordinate system defined by this pose.
The pose relative coordinates with have origin in the position of this pose, and axis will be aligned with the rotation of this pose.
Returns Matrix4
.
pose.getTransformationMatrixFromPose(otherPose)
Given a second pose that represent the same object in a second coordinate system, this method returns a 4x4 matrix that transforms coordinates in the second coordinate system into the coordinate system of this pose.
Returns Matrix4
.
pose.getTransformationMatrixToPose(otherPose)
Given a second pose that represent the same object in a second coordinate system, this method returns a 4x4 matrix that transforms coordinates in the coordinate system of this pose into the coordinate system of the second pose.
Returns Matrix4
.