docs.unity.cn
    Show / Hide Table of Contents

    Class QuaternionExtensions

    Extension methods for Quaternion structs

    Inheritance
    Object
    QuaternionExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.XR.CoreUtils
    Syntax
    public static class QuaternionExtensions

    Methods

    ConstrainYaw(Quaternion)

    Returns a rotation which only contains the yaw component of the given rotation. The resulting rotation is not normalized.

    Declaration
    public static Quaternion ConstrainYaw(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The rotation we would like to constrain

    Returns
    Type Description
    Quaternion

    A yaw-only rotation which matches the input's yaw

    ConstrainYawNormalized(Quaternion)

    Returns a rotation which only contains the yaw component of the given rotation

    Declaration
    public static Quaternion ConstrainYawNormalized(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The rotation we would like to constrain

    Returns
    Type Description
    Quaternion

    A yaw-only rotation which matches the input's yaw

    ConstrainYawPitchNormalized(Quaternion)

    Returns a rotation which only contains the yaw and pitch component of the given rotation

    Declaration
    public static Quaternion ConstrainYawPitchNormalized(this Quaternion rotation)
    Parameters
    Type Name Description
    Quaternion rotation

    The rotation we would like to constrain

    Returns
    Type Description
    Quaternion

    A yaw/pitch-only rotation which matches the input's yaw and pitch

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, December 21, 2022
    Terms of use