#include <ShQuaternion.hpp>
Collaboration diagram for SH::ShQuaternion< B, T >:
Public Member Functions | |
ShQuaternion () | |
Constructor for ShQuaternion. | |
template<ShBindingType B2> | ShQuaternion (const ShQuaternion< B2, T > &other) |
Constructor for ShQuaternion with a quaternion as parameter. | |
template<ShBindingType B2> | ShQuaternion (const ShVector< 4, B2, T > &values) |
Constructor for ShQuaternion with a 4-vector as parameter. | |
template<ShBindingType B2, ShBindingType B3> | ShQuaternion (const ShAttrib< 1, B2, T > &angle, const ShVector< 3, B3, T > &axis) |
Constructor for ShQuaternion with an angle and axis of rotation. | |
template<ShBindingType B2> | ShQuaternion (const ShMatrix< 4, 4, B2, T > &mat) |
Constructor for ShQuaternion with a rotation matrix. | |
template<ShBindingType B2> ShQuaternion & | operator= (const ShQuaternion< B2, T > &other) |
Definition of assignment to another quaternion. | |
template<ShBindingType B2> ShQuaternion & | operator+= (const ShQuaternion< B2, T > &right) |
Definition of the add-assign operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion & | operator-= (const ShQuaternion< B2, T > &right) |
Definition of the minus-assign operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion & | operator *= (const ShQuaternion< B2, T > &right) |
Definition of the times-assign operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion & | operator *= (const ShAttrib< 1, B2, T > &right) |
Definition of the times-assign operation with a scalar. | |
template<ShBindingType B2> ShQuaternion & | operator *= (const ShVector< 3, B2, T > &right) |
Definition of the times-assign operation with a 3-vector. | |
template<ShBindingType B2> ShQuaternion & | operator *= (const ShNormal< 3, B2, T > &right) |
Definition of the times-assign operation with a 3-normal. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator+ (const ShQuaternion< B2, T > &q2) |
Definition of the add operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator- (const ShQuaternion< B2, T > &q2) |
Definition of the subtract operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator * (const ShQuaternion< B2, T > &q2) |
Definition of the multiply operation with another quaternion. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator * (const ShAttrib< 1, B2, T > &c) |
Definition of the multiply operation with a scalar. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator * (const ShVector< 3, B2, T > &q2) |
Definition of the times operation with a 3-vector. | |
template<ShBindingType B2> ShQuaternion< SH_TEMP, T > | operator * (const ShNormal< 3, B2, T > &q2) |
Definition of the times operation with a 3-normal. | |
void | normalize () |
Definition of the normalize function. | |
void | getValues (T values[]) const |
Definition of the getValues function. | |
void | setUnit (bool flag) |
Definition of the setUnit function. | |
void | name (const std::string &name) |
Definition of the name function. | |
std::string | name () const |
Definition of the name function. | |
template<ShBindingType B2> ShAttrib< 1, SH_TEMP, T > | dot (const ShQuaternion< B2, T > &q) const |
Definition of the dot function. | |
ShQuaternion< SH_TEMP, T > | conjugate () const |
Definition of the conjugate function. | |
ShQuaternion< SH_TEMP, T > | inverse () const |
Definition of the inverse function. | |
ShMatrix< 4, 4, SH_TEMP, T > | getMatrix () const |
Definition of the getMatrix function. | |
ShVector< 4, SH_TEMP, T > | getVector () const |
Definition of the getVector function. | |
Friends | |
template<ShBindingType B2, typename T2> std::ostream & | operator<< (std::ostream &out, const ShQuaternion< B2, T2 > &q) |
Definition at line 38 of file ShQuaternion.hpp.
|
Constructor for ShQuaternion. Creates a identity ShQuaternion Definition at line 31 of file ShQuaternionImpl.hpp. |
|
Constructor for ShQuaternion with a quaternion as parameter. Creates a ShQuaternion where each element is equal to the one in the parameters
Definition at line 42 of file ShQuaternionImpl.hpp. |
|
Constructor for ShQuaternion with a 4-vector as parameter. Creates a ShQuaternion where each element is equal to the one in the parameters
Definition at line 49 of file ShQuaternionImpl.hpp. |
|
Constructor for ShQuaternion with an angle and axis of rotation. Creates a unit ShQuaternion defined by a rotation
Definition at line 56 of file ShQuaternionImpl.hpp. References SH::cos(), SH::normalize(), and SH::sin(). |
|
Constructor for ShQuaternion with a rotation matrix. Creates a unit ShQuaternion defined by a rotation
Definition at line 67 of file ShQuaternionImpl.hpp. |
|
Definition of the conjugate function. Returns the conjugate of this quaternion Definition at line 217 of file ShQuaternionImpl.hpp. Referenced by SH::ShQuaternion< B, T >::inverse(). |
|
Definition of the dot function. Returns the dot product between this quaternion and q
Definition at line 211 of file ShQuaternionImpl.hpp. References SH::dot(), and SH::ShQuaternion< B, T >::getVector(). |
|
Definition of the getMatrix function. Returns the rotation matrix defined by this quaternion
Definition at line 239 of file ShQuaternionImpl.hpp. |
|
Definition of the getValues function. Outputs the current content of the quaternion as a T array
Definition at line 334 of file ShQuaternionImpl.hpp. References SH::ShVariable::getValues(). |
|
Definition of the getVector function. Returns the values of this quaternion as a vector Definition at line 262 of file ShQuaternionImpl.hpp. Referenced by SH::ShQuaternion< B, T >::dot(), SH::ShQuaternion< B, T >::operator *=(), SH::ShQuaternion< B, T >::operator+=(), SH::ShQuaternion< B, T >::operator-=(), and SH::ShQuaternion< B, T >::operator=(). |
|
Definition of the inverse function. Returns the inverse of this quaternion (same as conjugate if unit) Definition at line 228 of file ShQuaternionImpl.hpp. References SH::ShQuaternion< B, T >::conjugate(), and SH::dot(). |
|
Definition of the name function. Returns this variable's name. Definition at line 366 of file ShQuaternionImpl.hpp. |
|
Definition of the name function. Set this variable's name. If set to the empty string, defaults to the type and id of the variable.
Definition at line 372 of file ShQuaternionImpl.hpp. |
|
Definition of the normalize function. Normalizes the current quaternion which makes it unit Definition at line 322 of file ShQuaternionImpl.hpp. References SH::normalize(). |
|
Definition of the times operation with a 3-normal. Returns a new ShQuaternion equals to the current quaternion * ShQuaternion(0.0, right)
Definition at line 315 of file ShQuaternionImpl.hpp. |
|
Definition of the times operation with a 3-vector. Returns a new ShQuaternion equals to the current quaternion * ShQuaternion(0.0, right)
Definition at line 306 of file ShQuaternionImpl.hpp. |
|
Definition of the multiply operation with a scalar. Returns a new ShQuaternion equals to the current quaternion * c
Definition at line 297 of file ShQuaternionImpl.hpp. |
|
Definition of the multiply operation with another quaternion. Returns a new ShQuaternion equals to the current quaternion * q2
Definition at line 288 of file ShQuaternionImpl.hpp. |
|
Definition of the times-assign operation with a 3-normal. Returns the address of a quaternion where the result is the current quaternion * ShQuaternion(0.0, right)
Definition at line 198 of file ShQuaternionImpl.hpp. |
|
Definition of the times-assign operation with a 3-vector. Returns the address of a quaternion where the result is the current quaternion * ShQuaternion(0.0, right)
Definition at line 185 of file ShQuaternionImpl.hpp. |
|
Definition of the times-assign operation with a scalar. Returns the address of a quaternion where the result is the current quaternion (each component) multiplied by right
Definition at line 176 of file ShQuaternionImpl.hpp. |
|
Definition of the times-assign operation with another quaternion. Returns the address of a quaternion where the result is the current quaternion * right
Definition at line 158 of file ShQuaternionImpl.hpp. References SH::cross(), SH::dot(), and SH::ShQuaternion< B, T >::getVector(). |
|
Definition of the add operation with another quaternion. Returns a new ShQuaternion equals to the current quaternion + q2
Definition at line 270 of file ShQuaternionImpl.hpp. |
|
Definition of the add-assign operation with another quaternion. Returns the address of a quaternion where the result is the current quaternion + right
Definition at line 140 of file ShQuaternionImpl.hpp. References SH::ShQuaternion< B, T >::getVector(). |
|
Definition of the subtract operation with another quaternion. Returns a new ShQuaternion equals to the current quaternion - q2
Definition at line 279 of file ShQuaternionImpl.hpp. |
|
Definition of the minus-assign operation with another quaternion. Returns the address of a quaternion where the result is the current quaternion - right
Definition at line 149 of file ShQuaternionImpl.hpp. References SH::ShQuaternion< B, T >::getVector(). |
|
Definition of assignment to another quaternion. Returns the address of a quaternion from which the values were copied from other
Definition at line 131 of file ShQuaternionImpl.hpp. References SH::ShQuaternion< B, T >::getVector(). |
|
Definition of the setUnit function. Manually indicate whether the quaternion is unit or non-unit
Definition at line 328 of file ShQuaternionImpl.hpp. |