Quaternion Structure

Represents a vector that is used to encode three-dimensional physical rotations.

Namespace:  System.Numerics
Assembly:  System.Numerics.Vectors (in System.Numerics.Vectors.dll)

public value class Quaternion : IEquatable<Quaternion>

The Quaternion type exposes the following members.

  NameDescription
Public methodQuaternion(Vector3, Single)Creates a quaternion from the specified vector and rotation parts.
Public methodQuaternion(Single, Single, Single, Single)Constructs a quaternion from the specified components.
Top

  NameDescription
Public propertyStatic memberIdentityGets a quaternion that represents no rotation.
Public propertyIsIdentityGets a value that indicates whether the current instance is the identity quaternion.
Top

  NameDescription
Public methodStatic memberAddAdds each element in one quaternion with its corresponding element in a second quaternion.
Public methodStatic memberConcatenateConcatenates two quaternions.
Public methodStatic memberConjugateReturns the conjugate of a specified quaternion.
Public methodStatic memberCreateFromAxisAngleCreates a quaternion from a vector and an angle to rotate about the vector.
Public methodStatic memberCreateFromRotationMatrixCreates a quaternion from the specified rotation matrix.
Public methodStatic memberCreateFromYawPitchRollCreates a new quaternion from the given yaw, pitch, and roll.
Public methodStatic memberDivideDivides one quaternion by a second quaternion.
Public methodStatic memberDotCalculates the dot product of two quaternions.
Public methodEquals(Object)Returns a value that indicates whether this instance and a specified object are equal. (Overrides ValueType::Equals(Object).)
Public methodEquals(Quaternion)Returns a value that indicates whether this instance and another quaternion are equal.
Public methodGetHashCodeReturns the hash code for this instance. (Overrides ValueType::GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberInverseReturns the inverse of a quaternion.
Public methodLengthCalculates the length of the quaternion.
Public methodLengthSquaredCalculates the squared length of the quaternion.
Public methodStatic memberLerpPerforms a linear interpolation between two quaternions based on a value that specifies the weighting of the second quaternion.
Public methodStatic memberMultiply(Quaternion, Quaternion)Returns the quaternion that results from multiplying two quaternions together.
Public methodStatic memberMultiply(Quaternion, Single)Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor.
Public methodStatic memberNegateReverses the sign of each component of the quaternion.
Public methodStatic memberNormalizeDivides each component of a specified Quaternion by its length.
Public methodStatic memberSlerpInterpolates between two quaternions, using spherical linear interpolation.
Public methodStatic memberSubtractSubtracts each element in a second quaternion from its corresponding element in a first quaternion.
Public methodToStringReturns a string that represents this quaternion. (Overrides ValueType::ToString().)
Top

  NameDescription
Public operatorStatic memberAdditionAdds each element in one quaternion with its corresponding element in a second quaternion.
Public operatorStatic memberDivisionDivides one quaternion by a second quaternion.
Public operatorStatic memberEqualityReturns a value that indicates whether two quaternions are equal.
Public operatorStatic memberInequalityReturns a value that indicates whether two quaternions are not equal.
Public operatorStatic memberMultiply(Quaternion, Quaternion)Returns the quaternion that results from multiplying two quaternions together.
Public operatorStatic memberMultiply(Quaternion, Single)Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor.
Public operatorStatic memberSubtractionSubtracts each element in a second quaternion from its corresponding element in a first quaternion.
Public operatorStatic memberUnaryNegationReverses the sign of each component of the quaternion.
Top

  NameDescription
Public fieldW The rotation component of the quaternion.
Public fieldXThe X value of the vector component of the quaternion.
Public fieldYThe Y value of the vector component of the quaternion.
Public fieldZThe Z value of the vector component of the quaternion.
Top

The Quaternion structure is used to efficiently rotate an object about the (x,y,z) vector by the angle theta, where:

w = cos(theta/2)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: