Public Member Functions

bool Equals (Quaternion const &q, int in_tolerance=32) const
 
Quaternion Exp () const
 
Quaternion Lerp (Quaternion const &in_right, float in_fraction) const
 
Quaternion Log () const
 
float Norm () const
 
Quaternion const & Normalize ()
 
bool operator!= (Quaternion const &q) const
 
Quaternion operator* (Quaternion const &in_right) const
 
Quaternion operator* (float in_right) const
 
Quaternion operator+ (Quaternion const &in_right) const
 
Quaternion operator- (Quaternion const &in_right) const
 
Quaternion operator/ (float in_right) const
 
bool operator== (Quaternion const &q) const
 
Quaternion (float in_w, float in_x, float in_y, float in_z)
 
Quaternion (Quaternion const &that)
 
Quaternion Slerp (Quaternion const &in_right, float in_fraction, bool in_shortest_path_only=true) const
 
Quaternion Spline (Quaternion const &in_previous, Quaternion const &in_next) const
 
Quaternion Squad (Quaternion const &in_right, Quaternion const &in_control1, Quaternion const &in_control2, float in_fraction) const
 

Static Public Member Functions

static Quaternion ComputeRotation (float in_degrees, HPS::Vector const &in_axis)
 
static Quaternion ComputeRotation (float in_x, float in_y, float in_z)
 

Public Attributes

float w
 
float x
 
float y
 
float z
 

Friends

Quaternion operator* (float in_left, Quaternion const &in_right)
 

Member Function Documentation

◆ ComputeRotation() [1/2]

static Quaternion HPS::Quaternion::ComputeRotation ( float  in_degrees,
HPS::Vector const &  in_axis 
)
inlinestatic

Computes a quaternion from a rotation about an axis.

Parameters
in_degreesThe angle in degrees to rotate.
in_axisThe axis to rotate about.
Returns
The resulting Quaternion object.

◆ ComputeRotation() [2/2]

static Quaternion HPS::Quaternion::ComputeRotation ( float  in_x,
float  in_y,
float  in_z 
)
inlinestatic

Computes a quaternion from a rotation around the primary axes.

Parameters
in_xThe number of degrees to rotate around the x-axis.
in_yThe number of degrees to rotate around the y-axis.
in_zThe number of degrees to rotate around the z-axis.
Returns
The resulting Quaternion object.

◆ Spline()

Quaternion HPS::Quaternion::Spline ( Quaternion const &  in_previous,
Quaternion const &  in_next 
) const
inline

Calculate a control point to be used in spline interpolation

Parameters
in_previousThe control point before this
in_nextThe control point after this
Returns
Resultant spline control point

◆ Squad()

Quaternion HPS::Quaternion::Squad ( Quaternion const &  in_right,
Quaternion const &  in_control1,
Quaternion const &  in_control2,
float  in_fraction 
) const
inline

Spherical cubic interpolation between two Quaternions

Parameters
in_rightThe Quaternion for interpolation.
in_control1The first control point.
in_control2The second control point.
in_fractionInterpolation distance (0 - 1).
Returns
Result of interpolation.

The documentation for this class was generated from the following file: