| 
    OpenVDB
    13.0.0
    
   | 
 
#include <openvdb/math/Mat.h>
Classes | |
| struct | UnsafeConstruct | 
Public Types | |
| using | value_type = T | 
| using | ValueType = T | 
Public Member Functions | |
| Quat ()=default | |
| Quat (T x, T y, T z, T w) | |
| Constructor with four arguments, e.g. Quatf q(1,2,3,4);.  More... | |
| Quat (T *a) | |
| Constructor with array argument, e.g. float a[4]; Quatf q(a);.  More... | |
| Quat (const Vec3< T > &axis, T angle) | |
| Quat (math::Axis axis, T angle) | |
| Constructor given rotation as axis and angle.  More... | |
| template<typename T1 > | |
| Quat (const Mat3< T1 > &rot, UnsafeConstruct) | |
| template<typename T1 > | |
| Quat (const Mat3< T1 > &rot) | |
| Constructor given a rotation matrix.  More... | |
| T & | x () | 
| Reference to the component, e.g. q.x() = 4.5f;.  More... | |
| T & | y () | 
| T & | z () | 
| T & | w () | 
| T | x () const | 
| Get the component, e.g. float f = q.w();.  More... | |
| T | y () const | 
| T | z () const | 
| T | w () const | 
| T & | operator[] (int i) | 
| Array style reference to the components, e.g. q[3] = 1.34f;.  More... | |
| T | operator[] (int i) const | 
| Array style constant reference to the components, e.g. float f = q[1];.  More... | |
| operator T * () | |
| Cast to T*.  More... | |
| operator const T * () const | |
| T & | operator() (int i) | 
| Alternative indexed reference to the elements.  More... | |
| T | operator() (int i) const | 
| Alternative indexed constant reference to the elements,.  More... | |
| T | angle () const | 
| Return angle of rotation.  More... | |
| Vec3< T > | axis () const | 
| Return axis of rotation.  More... | |
| Quat & | init (T x, T y, T z, T w) | 
| "this" quaternion gets initialized to [x, y, z, w]  More... | |
| Quat & | init () | 
| "this" quaternion gets initialized to identity, same as setIdentity()  More... | |
| Quat & | setAxisAngle (const Vec3< T > &axis, T angle) | 
| Quat & | setZero () | 
| Set "this" vector to zero.  More... | |
| Quat & | setIdentity () | 
| Set "this" vector to identity.  More... | |
| Vec3< T > | eulerAngles (RotationOrder rotationOrder) const | 
| Returns vector of x,y,z rotational components.  More... | |
| bool | operator== (const Quat &q) const | 
| Equality operator, does exact floating point comparisons.  More... | |
| bool | eq (const Quat &q, T eps=1.0e-7) const | 
| Test if "this" is equivalent to q with tolerance of eps value.  More... | |
| Quat & | operator+= (const Quat &q) | 
| Add quaternion q to "this" quaternion, e.g. q += q1;.  More... | |
| Quat & | operator-= (const Quat &q) | 
| Subtract quaternion q from "this" quaternion, e.g. q -= q1;.  More... | |
| Quat & | operator*= (T scalar) | 
| Scale "this" quaternion by scalar, e.g. q *= scalar;.  More... | |
| Quat | operator+ (const Quat &q) const | 
| Return (this+q), e.g. q = q1 + q2;.  More... | |
| Quat | operator- (const Quat &q) const | 
| Return (this-q), e.g. q = q1 - q2;.  More... | |
| Quat | operator* (const Quat &q) const | 
| Return (this*q), e.g. q = q1 * q2;.  More... | |
| Quat | operator*= (const Quat &q) | 
| Assigns this to (this*q), e.g. q *= q1;.  More... | |
| Quat | operator* (T scalar) const | 
| Return (this*scalar), e.g. q = q1 * scalar;.  More... | |
| Quat | operator/ (T scalar) const | 
| Return (this/scalar), e.g. q = q1 / scalar;.  More... | |
| Quat | operator- () const | 
| Negation operator, e.g. q = -q;.  More... | |
| Quat & | add (const Quat &q1, const Quat &q2) | 
| Quat & | sub (const Quat &q1, const Quat &q2) | 
| Quat & | mult (const Quat &q1, const Quat &q2) | 
| Quat & | scale (T scale, const Quat &q) | 
| T | dot (const Quat &q) const | 
| Dot product.  More... | |
| Quat | derivative (const Vec3< T > &omega) const | 
| bool | normalize (T eps=T(1.0e-8)) | 
| this = normalized this  More... | |
| Quat | unit () const | 
| this = normalized this  More... | |
| Quat | inverse (T tolerance=T(0)) const | 
| returns inverse of this  More... | |
| Quat | conjugate () const | 
| Vec3< T > | rotateVector (const Vec3< T > &v) const | 
| Return rotated vector by "this" quaternion.  More... | |
| std::string | str () const | 
| void | write (std::ostream &os) const | 
| void | read (std::istream &is) | 
Static Public Member Functions | |
| static unsigned | numElements () | 
| static Quat | zero () | 
| Predefined constants, e.g. Quat q = Quat::identity();.  More... | |
| static Quat | identity () | 
Static Public Attributes | |
| static const int | size = 4 | 
Protected Attributes | |
| T | mm [4] | 
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const Quat &q) | 
| Output to the stream, e.g. std::cout << q << std::endl;.  More... | |
| Quat | slerp (const Quat &q1, const Quat &q2, T t, T tolerance) | 
| using value_type = T | 
| using ValueType = T | 
      
  | 
  default | 
Trivial constructor, the quaternion is NOT initialized
      
  | 
  inline | 
Constructor with four arguments, e.g. Quatf q(1,2,3,4);.
      
  | 
  inline | 
Constructor with array argument, e.g. float a[4]; Quatf q(a);.
Constructor given rotation as axis and angle, the axis must be unit vector
      
  | 
  inline | 
Constructor given rotation as axis and angle.
      
  | 
  inline | 
this = q1 + q2 "this", q1 and q2 need not be distinct objects, e.g. q.add(q1,q);
      
  | 
  inline | 
Return angle of rotation.
      
  | 
  inline | 
Return axis of rotation.
      
  | 
  inline | 
Return the conjugate of "this", same as invert without unit quaternion test
Return the quaternion rate corrsponding to the angular velocity omega and "this" current rotation
      
  | 
  inline | 
Dot product.
      
  | 
  inline | 
Test if "this" is equivalent to q with tolerance of eps value.
      
  | 
  inline | 
Returns vector of x,y,z rotational components.
      
  | 
  inlinestatic | 
      
  | 
  inline | 
"this" quaternion gets initialized to [x, y, z, w]
      
  | 
  inline | 
"this" quaternion gets initialized to identity, same as setIdentity()
      
  | 
  inline | 
returns inverse of this
this = q1 * q2 q1 and q2 must be distinct objects than "this", e.g. q.mult(q1,q2);
      
  | 
  inline | 
this = normalized this
      
  | 
  inlinestatic | 
      
  | 
  inline | 
      
  | 
  inline | 
Cast to T*.
      
  | 
  inline | 
Alternative indexed reference to the elements.
      
  | 
  inline | 
Alternative indexed constant reference to the elements,.
      
  | 
  inline | 
Return (this*scalar), e.g. q = q1 * scalar;.
      
  | 
  inline | 
Scale "this" quaternion by scalar, e.g. q *= scalar;.
Add quaternion q to "this" quaternion, e.g. q += q1;.
      
  | 
  inline | 
Negation operator, e.g. q = -q;.
Subtract quaternion q from "this" quaternion, e.g. q -= q1;.
      
  | 
  inline | 
Return (this/scalar), e.g. q = q1 / scalar;.
      
  | 
  inline | 
Equality operator, does exact floating point comparisons.
      
  | 
  inline | 
Array style reference to the components, e.g. q[3] = 1.34f;.
      
  | 
  inline | 
Array style constant reference to the components, e.g. float f = q[1];.
      
  | 
  inline | 
Return rotated vector by "this" quaternion.
this = scalar*q, q need not be distinct object than "this", e.g. q.scale(1.5,q1);
Set "this" quaternion to rotation specified by axis and angle, the axis must be unit vector
      
  | 
  inline | 
Set "this" vector to identity.
      
  | 
  inline | 
Set "this" vector to zero.
      
  | 
  inline | 
this = q1 - q2 "this", q1 and q2 need not be distinct objects, e.g. q.sub(q1,q);
      
  | 
  inline | 
this = normalized this
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Reference to the component, e.g. q.x() = 4.5f;.
      
  | 
  inline | 
Get the component, e.g. float f = q.w();.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inlinestatic | 
Predefined constants, e.g. Quat q = Quat::identity();.
      
  | 
  friend | 
Output to the stream, e.g. std::cout << q << std::endl;.
      
  | 
  protected | 
      
  | 
  static | 
 1.8.11