![]() |
CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
template class for quaternions More...
#include <cs237-quat.hxx>
Public Member Functions | |
quat () | |
quat (quat const &q) | |
quat (T xx, T yy, T zz) | |
quat (T xx, T yy, T zz, T ww) | |
quat (vec3< T > const &v) | |
quat (vec3< T > const &v, T ww) | |
quat (T angle, vec3< T > const &axis) | |
create a quaternion from an angle (in degrees) and an axis vector More... | |
T & | operator[] (unsigned int const &i) |
T const & | operator[] (unsigned int const &i) const |
quat & | operator= (quat const &v) |
quat & | operator+= (quat const &v) |
quat & | operator-= (quat const &v) |
quat & | operator*= (T const &s) |
quat & | operator*= (quat const &q) |
quat & | operator*= (vec3< T > const &v) |
quat & | operator/= (T const &s) |
quat | conjugate () const |
quat | inverse () const |
T | length () const |
quat & | normalize () |
normalize this quaternion to unit length More... | |
vec3< T > | rotate (vec3< T > const &v) const |
mat3x3< T > | toMat3x3 () const |
return the 3x3 linear rotation matrix represented by this quaternion More... | |
mat4x4< T > | toMat4x4 () const |
return the 3x3 affine rotation matrix represented by this quaternion More... | |
Public Attributes | |
T | x |
T | y |
T | z |
T | w |
template class for quaternions
|
inline |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
create a quaternion from an angle (in degrees) and an axis vector
|
inline |
|
inline |
|
inline |
|
inline |
normalize this quaternion to unit length
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
T const & cs237::__detail::quat< T >::operator[] | ( | unsigned int const & | i | ) | const |
|
inline |
apply the rotation represented by this quaternion to a vector; this operation is equivalent to (*this) * v * this->inverse().
mat3x3<T> cs237::__detail::quat< T >::toMat3x3 | ( | ) | const |
return the 3x3 linear rotation matrix represented by this quaternion
mat4x4<T> cs237::__detail::quat< T >::toMat4x4 | ( | ) | const |
return the 3x3 affine rotation matrix represented by this quaternion
T cs237::__detail::quat< T >::w |
T cs237::__detail::quat< T >::x |
T cs237::__detail::quat< T >::y |
T cs237::__detail::quat< T >::z |