Class QuaternionExtensions
Extension methods for Quaternion structs.
Inherited Members
Namespace: Unity.XR.CoreUtils
Assembly: Unity.XR.CoreUtils.dll
Syntax
public static class QuaternionExtensions
Methods
ConstrainYaw(Quaternion)
Returns a rotation that only contains the yaw component of the specified rotation. The resulting rotation is not normalized.
Declaration
public static Quaternion ConstrainYaw(this Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The source rotation. |
Returns
Type | Description |
---|---|
Quaternion | A yaw-only rotation that matches the input rotation's yaw. |
ConstrainYawNormalized(Quaternion)
Returns a normalized rotation that only contains the yaw component of the specified rotation.
Declaration
public static Quaternion ConstrainYawNormalized(this Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The source rotation. |
Returns
Type | Description |
---|---|
Quaternion | A yaw-only rotation that matches the input rotation's yaw. |
ConstrainYawPitchNormalized(Quaternion)
Returns a normalized rotation that only contains the yaw and pitch components of the specified rotation
Declaration
public static Quaternion ConstrainYawPitchNormalized(this Quaternion rotation)
Parameters
Type | Name | Description |
---|---|---|
Quaternion | rotation | The source rotation. |
Returns
Type | Description |
---|---|
Quaternion | A yaw- and pitch-only rotation that matches the input rotation's yaw and pitch. |