.NET SDK Documentation

    Show / Hide Table of Contents

    Struct Quaternion

    Represents the rotation of an object in the world.

    Implements
    IEquatable<Quaternion>
    Namespace: Anki.Vector.Types
    Assembly: Anki.Vector.dll
    Syntax
    public struct Quaternion : IEquatable<Quaternion>

    Constructors

    | Improve this Doc View Source

    Quaternion(Single)

    Initializes a new instance of the Quaternion struct. This function converts an angle in the z axis (Euler angle z component) to a quaternion.

    public Quaternion(float radiansZ)
    Parameters
    Type Name Description
    Single radiansZ

    angle in the z axis in radians.

    | Improve this Doc View Source

    Quaternion(Single, Single, Single, Single)

    Initializes a new instance of the Quaternion struct.

    public Quaternion(float q0, float q1, float q2, float q3)
    Parameters
    Type Name Description
    Single q0

    The The q0 (w) value of the quaternion.

    Single q1

    The q1 (i) value of the quaternion..

    Single q2

    The q2 (j) value of the quaternion..

    Single q3

    The q3 (k) value of the quaternion..

    Properties

    | Improve this Doc View Source

    AngleZ

    An Angle instance representing the z Euler component of the object's rotation in radians

    public float AngleZ { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Q0

    Gets the q0 (w) value of the quaternion.

    public float Q0 { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Q1

    Gets the q1 (i) value of the quaternion.

    public float Q1 { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Q2

    Gets the q2 (j) value of the quaternion.

    public float Q2 { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Q3

    Gets the q3 (k) value of the quaternion.

    public float Q3 { get; }
    Property Type
    Single

    Methods

    | Improve this Doc View Source

    Equals(Quaternion)

    Indicates whether the current object is equal to another object of the same type.

    public bool Equals(Quaternion other)
    Parameters
    Type Name Description
    Quaternion other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Determines whether the specified Object, is equal to this instance.

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The Object to compare with this instance.

    Returns
    Type Description
    Boolean

    true if the specified Object is equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Returns a hash code for this instance.

    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Converts to string.

    public override string ToString()
    Returns
    Type Description
    String

    A String that represents this instance.

    Overrides
    ValueType.ToString()

    Operators

    | Improve this Doc View Source

    Equality(Quaternion, Quaternion)

    Implements the operator ==.

    public static bool operator ==(Quaternion lhs, Quaternion rhs)
    Parameters
    Type Name Description
    Quaternion lhs

    The LHS.

    Quaternion rhs

    The RHS.

    Returns
    Type Description
    Boolean

    The result of the operator.

    | Improve this Doc View Source

    Inequality(Quaternion, Quaternion)

    Implements the operator !=.

    public static bool operator !=(Quaternion lhs, Quaternion rhs)
    Parameters
    Type Name Description
    Quaternion lhs

    The LHS.

    Quaternion rhs

    The RHS.

    Returns
    Type Description
    Boolean

    The result of the operator.

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 by Wayne Venables