Click or drag to resize

Quaternion Structure

A structure encapsulating a four-dimensional vector (x,y,z,w), which is used to efficiently rotate an object about the (x,y,z) vector by the angle theta, where w = cos(theta/2).

Namespace:  Karamba.Geometry
Assembly:  KarambaCommon (in KarambaCommon.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[SerializableAttribute]
public struct Quaternion : IEquatable<Quaternion>

The Quaternion type exposes the following members.

Constructors
  NameDescription
Public methodQuaternion(Vector3)
Constructs a Quaternion from the given vector and rotation parts.
Public methodQuaternion(Vector3, Double)
Constructs a Quaternion from the given vector and rotation parts.
Public methodQuaternion(Double, Double, Double, Double)
Constructs a Quaternion from the given components.
Top
Properties
  NameDescription
Public propertyStatic memberIdentity
Returns a Quaternion representing no rotation.
Public propertyIsIdentity
Returns whether the Quaternion is the identity Quaternion.
Top
Methods
  NameDescription
Public methodStatic memberAdd
Adds two Quaternions element-by-element.
Public methodStatic memberConcatenate
Concatenates two Quaternions; the result represents the value1 rotation followed by the value2 rotation.
Public methodStatic memberConjugate
Creates the conjugate of a specified Quaternion.
Public methodStatic memberCreateFromAxisAngle
Creates a Quaternion from a vector and an angle to rotate about the vector.
Public methodStatic memberCreateFromRotationMatrix
Creates a Quaternion from the given rotation matrix.
Public methodStatic memberCreateFromYawPitchRoll
Creates a new Quaternion from the given yaw, pitch, and roll, in radians.
Public methodStatic memberDivide
Divides a Quaternion by another Quaternion.
Public methodStatic memberDot
Calculates the dot product of two Quaternions.
Public methodEquals(Object)
Returns a boolean indicating whether the given Object is equal to this Quaternion instance.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Quaternion)
Returns a boolean indicating whether the given Quaternion is equal to this Quaternion instance.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberInverse
Returns the inverse of a Quaternion.
Public methodLength
Calculates the length of the Quaternion.
Public methodLengthSquared
Calculates the length squared of the Quaternion. This operation is cheaper than Length().
Public methodStatic memberLerp
Linearly interpolates between two quaternions.
Public methodStatic memberMultiply(Quaternion, Quaternion)
Multiplies two Quaternions together.
Public methodStatic memberMultiply(Quaternion, Double)
Multiplies a Quaternion by a scalar value.
Public methodStatic memberNegate
Flips the sign of each component of the quaternion.
Public methodStatic memberNormalize
Divides each component of the Quaternion by the length of the Quaternion.
Public methodStatic memberSlerp
Interpolates between two quaternions, using spherical linear interpolation.
Public methodStatic memberSubtract
Subtracts one Quaternion from another.
Public methodToString
Returns a String representing this Quaternion instance.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds two Quaternions element-by-element.
Public operatorStatic memberDivision
Divides a Quaternion by another Quaternion.
Public operatorStatic memberEquality
Returns a boolean indicating whether the two given Quaternions are equal.
Public operatorStatic memberInequality
Returns a boolean indicating whether the two given Quaternions are not equal.
Public operatorStatic memberMultiply(Quaternion, Quaternion)
Multiplies two Quaternions together.
Public operatorStatic memberMultiply(Quaternion, Double)
Multiplies a Quaternion by a scalar value.
Public operatorStatic memberSubtraction
Subtracts one Quaternion from another.
Public operatorStatic memberUnaryNegation
Flips the sign of each component of the quaternion.
Top
Fields
  NameDescription
Public fieldW
Specifies the rotation component of the Quaternion.
Public fieldX
Specifies the X-value of the vector component of the Quaternion.
Public fieldY
Specifies the Y-value of the vector component of the Quaternion.
Public fieldZ
Specifies the Z-value of the vector component of the Quaternion.
Top
See Also