struct Pose
Pose represents a location and orientation in space,
excluding scale! CAUTION: the default value of a Pose includes a
completely zero Quat, which can cause problems. Use Pose.Identity
instead of new Pose()
for creating a default pose.
Instance Fields and Properties
|
|
Vec3 Forward |
Calculates the forward direction from this pose. This is done by multiplying the orientation with Vec3.Forward. Remember that Forward points down the -Z axis! |
Quat orientation |
Orientation of the pose, stored as a rotation from Vec3.Forward. |
Vec3 position |
Location of the pose. |
Ray Ray |
This creates a ray starting at the Pose’s position, and pointing in the ‘Forward’ direction. The Ray direction is a unit vector/normalized. |
Vec3 Right |
Calculates the right (+X) direction from this pose. This is done by multiplying the orientation with Vec3.Right. |
Vec3 Up |
Calculates the up (+Y) direction from this pose. This is done by multiplying the orientation with Vec3.Up. |
Instance Methods
|
|
Pose |
Basic initialization constructor! Just copies in the provided values directly. |
ToMatrix |
Converts this pose into a transform matrix, incorporating a provided scale value. |
ToString |
A string representation of the Pose, in the format of “position, Forward”. Mostly for debug visualization. |
Static Fields and Properties
|
|
Pose Identity |
A default, empty pose. Positioned at zero, and using Quat.Identity for orientation. |
Static Methods
|
|
Lerp |
Interpolates between two poses! It is unclamped, so values outside of (0,1) will extrapolate their position. |
LookAt |
Creates a Pose that looks from one location in the direction of another location. This leaves “Up” as the +Y axis. |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!