Struct XrPosef
A construct representing a position and orientation within a space, with position expressed in meters, and orientation represented as a unit quaternion. OpenXR Spec
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public struct XrPosef : IEquatable<XrPosef>
Constructors
XrPosef(Vector3, Quaternion)
Initializes and returns an instance of XrPosef with the provided parameters.
Declaration
public XrPosef(Vector3 vec3, Quaternion quaternion)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | vec3 | vector3 position. |
Quaternion | quaternion | quaternion orientation. |
Fields
Orientation
The orientation/rotation of the pose.
Declaration
public XrQuaternionf Orientation
Field Value
Type | Description |
---|---|
XrQuaternionf |
Position
The position of the pose.
Declaration
public XrVector3f Position
Field Value
Type | Description |
---|---|
XrVector3f |
Methods
Equals(object)
Compares for equality.
Two instances are equal if their bits are exactly identical for the Orientation
and Position
fields.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The other object. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(XrPosef)
Compares for equality.
Two instances are equal if their bits are exactly identical for the Orientation
and Position
fields.
Declaration
public bool Equals(XrPosef other)
Parameters
Type | Name | Description |
---|---|---|
XrPosef | other | The other instance. |
Returns
Type | Description |
---|---|
bool |
|
GetHashCode()
Generates a unique hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The hash code. |