Home | Download | Screen shots | Discussion | Documentation |
---|
Public Member Functions | |
rotation () throw () | |
Construct. | |
rotation (const float(&rot)[4]) throw () | |
Construct from an array. | |
rotation (float x, float y, float z, float angle) throw () | |
Construct from x , y , z , and angle components. | |
rotation (const vec3f &axis, float angle) throw () | |
Construct from an axis vector and an angle. | |
rotation (const vec3f &from_vec, const vec3f &to_vec) throw () | |
Construct a rotation between two vectors. | |
rotation (const quatf &quat) throw () | |
Construct from a quaternion. | |
rotation & | operator *= (const rotation &rot) throw () |
Multiply rotations. | |
const float & | operator[] (size_t index) const throw () |
Index-based element access. | |
float | x () const throw () |
Get the x axis component. | |
float | y () const throw () |
Get the y axis component. | |
float | z () const throw () |
Get the z axis component. | |
const vec3f | axis () const throw () |
Get the axis of rotation. | |
float | angle () const throw () |
Get the rotation angle. | |
void | x (float value) throw () |
Set the x axis component. | |
void | y (float value) throw () |
Set the y axis component. | |
void | z (float value) throw () |
Set the z axis component. | |
void | axis (const vec3f &axis) throw () |
Set the axis of rotation. | |
void | angle (float value) throw () |
Set the rotation angle. | |
const rotation | inverse () const throw () |
Inverse rotation. | |
const rotation | slerp (const rotation &dest_rot, float t) const throw () |
Spherical Linear intERPolation. | |
Private Attributes | |
float | rot [4] |
Rotation components. | |
Related Functions | |
(Note that these are not member functions.) | |
const rotation | operator * (const rotation &lhs, const rotation &rhs) throw() |
Multiply rotations. | |
bool | operator== (const rotation &lhs, const rotation &rhs) throw() |
Compare for equality. | |
bool | operator!= (const rotation &lhs, const rotation &rhs) throw() |
Compare for inequality. | |
std::ostream & | operator<< (std::ostream &out, const rotation &r) |
Stream output. |
VRML rotations are represented with four single precision floating point components. The first three are an axis of rotation, and the last is rotation in radians.
|
Construct.
|
|
Construct from an array.
|
|
Construct from
|
|
Construct from an axis vector and an angle.
|
|
Construct a rotation between two vectors. Construct a rotation equal to the rotation between two different vectors.
|
|
Construct from a quaternion.
|
|
Set the rotation angle.
|
|
Get the rotation angle.
|
|
Set the axis of rotation.
|
|
Get the axis of rotation.
|
|
Inverse rotation.
|
|
Multiply rotations.
|
|
Index-based element access.
|
|
Spherical Linear intERPolation.
|
|
Set the x axis component.
|
|
Get the x axis component.
|
|
Set the y axis component.
|
|
Get the y axis component.
|
|
Set the z axis component.
|
|
Get the z axis component.
|
|
Multiply rotations.
|
|
Compare for inequality.
|
|
Stream output.
|
|
Compare for equality.
|
|
Rotation components.
For internal use only. The first three components define an axis through the origin. The fourth component is a rotation around the axis. |