This site has been permanently archived. The content on this site was last updated in 2019.
Stay organized with collections
Save and categorize content based on your preferences.
Pose3D
Encapsulates a rotation and a translation.
Summary
This is a convenience class that allows construction and value access either by Matrix4x4 or Quaternion + Vector3 types.
Inheritance
Direct Known Subclasses:
MutablePose3D
Constructors and Destructors
|
Pose3D()
Initializes a new instance of the Pose3D class.
|
Pose3D(Vector3 position, Quaternion orientation)
Initializes a new instance of the Pose3D class.
|
Pose3D(Matrix4x4 matrix)
Initializes a new instance of the Pose3D class.
|
Public static attributes
|
FLIP_Z = Matrix4x4.Scale(new Vector3(1, 1, -1))
|
readonly Matrix4x4
Right-handed to left-handed matrix converter (and vice versa).
|
Properties
|
Matrix
|
Matrix4x4
Gets or sets the pose as a matrix in Unity gameobject convention.
|
Orientation
|
Quaternion
Gets or sets the rotation component of the pose.
|
Position
|
Vector3
Gets or sets the translation component of the pose.
|
RightHandedMatrix
|
Matrix4x4
Gets the pose as a matrix in right-handed coordinates.
|
Public static functions
|
FlipHandedness(Matrix4x4 matrix)
|
Matrix4x4
Flip the handedness of a matrix.
|
Protected functions
|
Set(Vector3 position, Quaternion orientation)
|
void
Sets a Pose3D according to the provided values.
|
Set(Matrix4x4 matrix)
|
void
Sets a Pose3D according to the provided values.
|
Public static attributes
FLIP_Z
readonly Matrix4x4 FLIP_Z = Matrix4x4.Scale(new Vector3(1, 1, -1))
Right-handed to left-handed matrix converter (and vice versa).
Properties
Matrix
Matrix4x4 Matrix
Gets or sets the pose as a matrix in Unity gameobject convention.
GVR contention is right-handed, while Unity convention is left-handed.
The pose as a matrix in Unity gameobject convention.
Orientation
Quaternion Orientation
Gets or sets the rotation component of the pose.
The rotation component of the pose.
Position
Vector3 Position
Gets or sets the translation component of the pose.
The translation component of the pose.
RightHandedMatrix
Matrix4x4 RightHandedMatrix
Gets the pose as a matrix in right-handed coordinates.
The pose as a matrix in right-handed coordinates.
Public functions
Pose3D
Pose3D()
Initializes a new instance of the Pose3D class.
Initializes position to the origin and orientation to the identity rotation.
Pose3D
Pose3D(
Vector3 position,
Quaternion orientation
)
Initializes a new instance of the Pose3D class.
Details |
Parameters |
position
|
The position to initialize.
|
orientation
|
The orientation to initialize.
|
|
Pose3D
Pose3D(
Matrix4x4 matrix
)
Initializes a new instance of the Pose3D class.
Details |
Parameters |
matrix
|
The matrix to initialize.
|
|
Public static functions
FlipHandedness
Matrix4x4 FlipHandedness(
Matrix4x4 matrix
)
Flip the handedness of a matrix.
Details |
Parameters |
matrix
|
The Matrix4x4 to flip.
|
|
Returns
|
A handedness-flipped Matrix4x4.
|
Protected functions
Set
void Set(
Vector3 position,
Quaternion orientation
)
Sets a Pose3D according to the provided values.
Details |
Parameters |
position
|
The position to set.
|
orientation
|
The orientation to set.
|
|
Set
void Set(
Matrix4x4 matrix
)
Sets a Pose3D according to the provided values.
Details |
Parameters |
matrix
|
The matrix to set.
|
|
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003e\u003ccode\u003ePose3D\u003c/code\u003e encapsulates rotation and translation, offering convenient construction and value access via \u003ccode\u003eMatrix4x4\u003c/code\u003e or \u003ccode\u003eQuaternion\u003c/code\u003e + \u003ccode\u003eVector3\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt provides properties for accessing and modifying the pose's position, orientation, and matrix representation in both Unity and right-handed coordinates.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePose3D\u003c/code\u003e includes static methods for flipping the handedness of a matrix and constructors for initializing from various data types.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eMutablePose3D\u003c/code\u003e and allows setting the pose using either position and orientation or a matrix.\u003c/p\u003e\n"]]],["Pose3D encapsulates rotation and translation, enabling access via `Matrix4x4` or `Quaternion` + `Vector3`. It can be initialized with a position/orientation or a matrix. Key actions include setting a Pose3D's values with `Set`, flipping matrix handedness with `FlipHandedness`, and initializing with the origin or identity rotation. Properties allow getting/setting the pose as `Matrix`, `Orientation`, `Position`, and `RightHandedMatrix`, and `FLIP_Z` converts between right-handed and left-handed matrix.\n"],null,["Pose3D\n\nEncapsulates a rotation and a translation.\n\nSummary\n\nThis is a convenience class that allows construction and value access either by Matrix4x4 or Quaternion + Vector3 types.\n\nInheritanceDirect Known Subclasses:[MutablePose3D](/vr/reference/unity/class/MutablePose3D)\n\n| Constructors and Destructors ||\n|---|---|\n| [Pose3D](#classPose3D_1ae7990746a758a181727844f1e7a4c321)`()` Initializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class. ||\n| [Pose3D](#classPose3D_1aee0d4293a73ac6979f844880abba2b50)`(Vector3 position, Quaternion orientation)` Initializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class. ||\n| [Pose3D](#classPose3D_1a312f7a43f03ea77f6a70d92152a3c857)`(Matrix4x4 matrix)` Initializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class. ||\n\n| Public static attributes ||\n|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|\n| [FLIP_Z](#classPose3D_1a696f278f27d739563b1bd8705e9575da)` = Matrix4x4.Scale(new Vector3(1, 1, -1))` | `readonly Matrix4x4` Right-handed to left-handed matrix converter (and vice versa). |\n\n| Properties ||\n|----------------------------------------------------------------------|-------------------------------------------------------------------------------|\n| [Matrix](#classPose3D_1a369abb76b08db340ae4e7bbd707b29a1) | `Matrix4x4` Gets or sets the pose as a matrix in Unity gameobject convention. |\n| [Orientation](#classPose3D_1a9feca30653b61f261d23f1b4692906fd) | `Quaternion` Gets or sets the rotation component of the pose. |\n| [Position](#classPose3D_1a9b6b79be719730e495717118f95ea4f7) | `Vector3` Gets or sets the translation component of the pose. |\n| [RightHandedMatrix](#classPose3D_1ad77425279d4a00e5c5c65e65d775fef7) | `Matrix4x4` Gets the pose as a matrix in right-handed coordinates. |\n\n| Public static functions ||\n|---------------------------------------------------------------------------------------|----------------------------------------------|\n| [FlipHandedness](#classPose3D_1a5c3f201a4baa91aef893bf95cba137d2)`(Matrix4x4 matrix)` | `Matrix4x4` Flip the handedness of a matrix. |\n\n| Protected functions ||\n|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [Set](#classPose3D_1a5dd55ee8be1972b45d528a98a3bd0df2)`(Vector3 position, Quaternion orientation)` | `void` Sets a [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) according to the provided values. |\n| [Set](#classPose3D_1ac5c53a6d8db8f87d42efbc4accec2625)`(Matrix4x4 matrix)` | `void` Sets a [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) according to the provided values. |\n\nPublic static attributes \n\nFLIP_Z \n\n```c#\nreadonly Matrix4x4 FLIP_Z = Matrix4x4.Scale(new Vector3(1, 1, -1))\n``` \nRight-handed to left-handed matrix converter (and vice versa).\n\nProperties \n\nMatrix \n\n```c#\nMatrix4x4 Matrix\n``` \nGets or sets the pose as a matrix in Unity gameobject convention.\n\nGVR contention is right-handed, while Unity convention is left-handed.\n\nThe pose as a matrix in Unity gameobject convention. \n\nOrientation \n\n```c#\nQuaternion Orientation\n``` \nGets or sets the rotation component of the pose.\n\nThe rotation component of the pose. \n\nPosition \n\n```c#\nVector3 Position\n``` \nGets or sets the translation component of the pose.\n\nThe translation component of the pose. \n\nRightHandedMatrix \n\n```c#\nMatrix4x4 RightHandedMatrix\n``` \nGets the pose as a matrix in right-handed coordinates.\n\nThe pose as a matrix in right-handed coordinates.\n\nPublic functions \n\nPose3D \n\n```c#\n Pose3D()\n``` \nInitializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class.\n\nInitializes position to the origin and orientation to the identity rotation. \n\nPose3D \n\n```c#\n Pose3D(\n Vector3 position,\n Quaternion orientation\n)\n``` \nInitializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------------|--------------------------------| | `position` | The position to initialize. | | `orientation` | The orientation to initialize. | |\n\nPose3D \n\n```c#\n Pose3D(\n Matrix4x4 matrix\n)\n``` \nInitializes a new instance of the [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) class.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------|\n| Parameters | |----------|---------------------------| | `matrix` | The matrix to initialize. | |\n\nPublic static functions \n\nFlipHandedness \n\n```c#\nMatrix4x4 FlipHandedness(\n Matrix4x4 matrix\n)\n``` \nFlip the handedness of a matrix.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------------------------------------------|\n| Parameters | |----------|------------------------| | `matrix` | The Matrix4x4 to flip. | |\n| **Returns** | A handedness-flipped Matrix4x4. |\n\nProtected functions \n\nSet \n\n```c#\nvoid Set(\n Vector3 position,\n Quaternion orientation\n)\n``` \nSets a [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) according to the provided values.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------------|-------------------------| | `position` | The position to set. | | `orientation` | The orientation to set. | |\n\nSet \n\n```c#\nvoid Set(\n Matrix4x4 matrix\n)\n``` \nSets a [Pose3D](/vr/reference/unity/class/Pose3D#classPose3D) according to the provided values.\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|---------------------------------------------------------------------|\n| Parameters | |----------|--------------------| | `matrix` | The matrix to set. | |"]]