SQuaternion
Index
Functions Index
string ToString ()
float Angle (SQuaternion b)
SQuaternion Lerp (SQuaternion b, float t)
SQuaternion Slerp (SQuaternion b, float t)
SQuaternion RotateTowards (SQuaternion b, float delta)
float Dot (SQuaternion b)
bool Equals (SQuaternion other)
Static Functions
static SQuaternion New (float x, float y, float z, float w)
static SQuaternion Euler (float x, float y, float z)
static SQuaternion AngleAxis (SVector axis, float angle)
static SQuaternion LookRotation (SVector forward) static SQuaternion LookRotation (SVector forward, SVector up)
static SQuaternion FromToRotation (SVector a, SVector b)
Properties Index
Functions
ToString
string ToString ()
Converts a quaternion to a human readable string
Angle
float Angle (SQuaternion b)
Returns the angle between two quaternions
Lerp
SQuaternion Lerp (SQuaternion b, float t)
Linearly interpolates between this and other quaternion, by factor t and returns the result
Slerp
SQuaternion Slerp (SQuaternion b, float t)
Spherically interpolates between this and other quaternion, by factor t and returns the result
RotateTowards
SQuaternion RotateTowards (SQuaternion b, float delta)
Rotates this towards other, by no more than t degrees
Dot
float Dot (SQuaternion b)
Returns the dot product of this and another quaternion
Equals
bool Equals (SQuaternion other)
Function Description
other
SQuaternion
The other Quaternion that we are comparing with.
New
static SQuaternion New (float x, float y, float z, float w)
Creates a new Quaternion
Euler
static SQuaternion Euler (float x, float y, float z)
Creates a quaternion using Euler angles.
AngleAxis
static SQuaternion AngleAxis (SVector axis, float angle)
Creates a quaternion from an Angle/Axis pair
LookRotation
static SQuaternion LookRotation (SVector forward) static SQuaternion LookRotation (SVector forward, SVector up)
Creates a quaternion a forward vector; presuming up is (0,1,0)
operator*
static SVector operator* (SQuaternion a, SVector b) static SQuaternion operator* (SQuaternion a, SQuaternion b)
The result of using the * operator.
FromToRotation
static SQuaternion FromToRotation (SVector a, SVector b)
Creates a rotation which rotates from a to b.
Usually you use this to rotate a transform so that one of its axes eg. the y-axis - follows a target direction b in world space.
Properties
X
float X get set
X axis
Y
float Y get set
Y axis
Z
float Z get set
Z axis
W
float W get set
W axis
EulerAngles
SVector EulerAngles get
Returns the Euler rotation for this Quaternion
Inverse
SQuaternion Inverse get
Returns the inverse of this quaternion
Identity
static SQuaternion Identity get
Equivalent of new SQuaternion(0,0,0,1)
Last updated
Was this helpful?

