Click or drag to resize

Quaternion Structure

Represents quaternions.

Namespace:  LightBuzz
Assembly:  LightBuzz (in LightBuzz.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[SerializableAttribute]
public struct Quaternion

The Quaternion type exposes the following members.

Constructors
  NameDescription
Public methodQuaternion(Vector3D, Single)
Construct a new Quaternion from vector and w components
Public methodQuaternion(Single, Single, Single, Single)
Constructs a new quaternion with given X, Y, Z, and W components.
Top
Properties
  NameDescription
Public propertyEulerAngles
Returns the euler angle representation of the rotation.
Public propertyItem
Access the X, Y, Z, W components of the quaternion using [0], [1], [2], [3] respectively.
Public propertyLength
Returns the length of the current vector.
Public propertyLengthSquared
Returns the squared length of the current vector.
Public propertyMagnitude
Returns the length of the current vector.
Public propertyMagnitudeSquared
Returns the squared length of the current vector.
Public propertyNormalized
Scale the given quaternion to unit length
Public propertyXYZ
Returns the 3D vector (X, Y, and Z values) of the current quaternion.
Top
Methods
  NameDescription
Public methodStatic memberAngle
Returns the angle (in degrees) between two quaternions.
Public methodStatic memberAngleAxis
Creates a rotation which rotates the specified angle degrees around the specified axis.
Public methodStatic memberDot
Returns the dot product of two quaternions.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ValueTypeEquals(Object).)
Public methodStatic memberEquals(Quaternion, Quaternion)
Specifies whether two quaternions are approximately equal.
Public methodStatic memberEuler(Vector3D)
Returns a rotation that rotates Z degrees around the Z axis, X degrees around the X axis, and Y degrees around the Y axis (in that order).
Public methodStatic memberEuler(Single, Single, Single)
Returns a rotation that rotates Z degrees around the Z axis, X degrees around the X axis, and Y degrees around the Y axis (in that order).
Public methodStatic memberFromToRotation
Creates a rotation which rotates from towards to.
Public methodGetHashCode
Returns the hash code of the current object.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodStatic memberInverse
Returns the inverse of rotation.
Public methodStatic memberLerp
Linearly interpolates between two quaternions by t.
Public methodStatic memberLookRotation(Vector3D)
Creates a rotation with the specified forward and upwards directions.
Public methodStatic memberLookRotation(Vector3D, Vector3D)
Creates a rotation with the specified forward and upwards directions.
Public methodStatic memberMultiply(Quaternion, Quaternion)
Multiplies a vector with another vector.
Public methodStatic memberMultiply(Quaternion, Vector2D)
Multiplies the given rotation around the given point.
Public methodStatic memberMultiply(Quaternion, Vector3D)
Multiplies the given rotation around the given point.
Public methodStatic memberNegate
Negates every component of the specified quaternion.
Public methodNormalize
Makes the current vector have a magnitude of 1.
Public methodStatic memberNormalize(Quaternion)
Makes the specified quaternion have a magnitude of 1.
Public methodRotate
Rotates the current quaternion according to the specified 3D vector.
Public methodStatic memberRotateTowards
Rotates a rotation which rotates from towards to.
Public methodSet
Sets the X, Y, Z, and W components of the current quaternion.
Public methodStatic memberSlerp
Spherically interpolates between two quaternions by t.
Public methodStatic memberSlerpUnclamped
Spherically interpolates between two quaternions by t. The parameter t is not calmped.
Public methodToString
Returns a string representation of the current object.
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two quaternions for equality.
Public operatorStatic member(Quaternion to Quaternion)
Converts the specified Unity Quaternion into its equivalent quaternion.
Public operatorStatic member(Quaternion to Quaternion)
Converts the specified Quaternion into its equivalent Unity Quaternion.
Public operatorStatic memberInequality
Compares two quaternions for inequality.
Public operatorStatic memberMultiply(Quaternion, Quaternion)
Multiplies a quaternion by another one.
Public operatorStatic memberMultiply(Quaternion, Vector2D)
Multiplies a quaternion by a 2D point.
Public operatorStatic memberMultiply(Quaternion, Vector3D)
Multiplies a quaternion by a 3D point.
Public operatorStatic memberMultiply(Quaternion, Vector3)
Multiplies the quaternion with a Unity 3D point.
Top
Fields
  NameDescription
Public fieldStatic memberIdentity
The identity rotation.
Public fieldW
W component of the vector.
Public fieldX
X component of the vector.
Public fieldY
Y component of the vector.
Public fieldZ
Z component of the vector.
Top
See Also