The spica renderer
|
#include <quaternion.h>
Public Member Functions | |
Quaternion () | |
The Quaternion constructor. | |
Quaternion (double x, double y, double z, double w=0.0) | |
The Quaternion constructor. More... | |
Quaternion (const Vector3d &v) | |
The Quaternion constructor. More... | |
Quaternion (const Quaternion &q) | |
The Quaternion constructor (copy). | |
~Quaternion () | |
The Quaternion destructor. | |
Quaternion & | operator= (const Quaternion &q) |
Assignment operator. | |
Quaternion & | operator*= (const Quaternion &q) |
Multiplication operator. | |
Vector3d | applyTo (const Vector3d &v) |
Apply transformation of quaternion to the vector. | |
Point3d | applyTo (const Point3d &p) |
Normal3d | applyTo (const Normal3d &n) |
double | squaredNorm () const |
Squared norm. | |
double | norm () const |
Norm. | |
Quaternion | inverse () const |
Inverse quarternion. | |
Vector3d | toVector3d () const |
Extract imaginary parts as a three-dimensional vector. | |
std::string | toString () const |
Convert to string. | |
double | x () const |
The first imaginary part. More... | |
double | y () const |
The second imaginary part. More... | |
double | z () const |
The third imaginary part. More... | |
double | w () const |
The real part. More... | |
Static Public Member Functions | |
static Quaternion | rotation (const Vector3d &axis, double theta) |
Make instance from rotation angle. More... | |
spica::Quaternion::Quaternion | ( | double | x, |
double | y, | ||
double | z, | ||
double | w = 0.0 |
||
) |
The Quaternion constructor.
x | The first imaginary part. |
y | The second imaginary part. |
z | The third imaginary part. |
w | The real part. |
|
explicit |
The Quaternion constructor.
v | The three-dimensional vector for imaginary parts. |
|
static |
Make instance from rotation angle.
axis | Rotation axis |
theta | Rotation angle by radii |
|
inline |
The real part.
|
inline |
The first imaginary part.
|
inline |
The second imaginary part.
|
inline |
The third imaginary part.