MaterialX 1.38.9
Loading...
Searching...
No Matches
Quaternion Class Reference

A quaternion vector. More...

#include <Types.h>

Inheritance diagram for Quaternion:
VectorN< Vector4, float, 4 > VectorBase

Public Member Functions

 Quaternion (float x, float y, float z, float w)
 
Quaternion operator* (const Quaternion &q) const
 
Quaternion getNormalized () const
 
Matrix44 toMatrix () const
 
- Public Member Functions inherited from VectorN< Vector4, float, 4 >
 VectorN (Uninit)
 
 VectorN (float s)
 
 VectorN (const std::array< float, N > &arr)
 
 VectorN (const vector< float > &vec)
 
 VectorN (const float *begin, const float *end)
 
bool operator== (const Vector4 &rhs) const
 Return true if the given vector is identical to this one.
 
bool operator!= (const Vector4 &rhs) const
 Return true if the given vector differs from this one.
 
bool operator< (const Vector4 &rhs) const
 Compare two vectors lexicographically.
 
float & operator[] (size_t i)
 Return the scalar value at the given index.
 
const float & operator[] (size_t i) const
 Return the const scalar value at the given index.
 
Vector4 operator+ (const Vector4 &rhs) const
 Component-wise addition of two vectors.
 
VectorNoperator+= (const Vector4 &rhs)
 Component-wise addition of two vectors.
 
Vector4 operator- (const Vector4 &rhs) const
 Component-wise subtraction of two vectors.
 
Vector4 operator- () const
 Unary negation of a vector.
 
VectorNoperator-= (const Vector4 &rhs)
 Component-wise subtraction of two vectors.
 
Vector4 operator* (const Vector4 &rhs) const
 Component-wise multiplication of two vectors.
 
Vector4 operator* (float s) const
 Component-wise multiplication of a vector by a scalar.
 
VectorNoperator*= (const Vector4 &rhs)
 Component-wise multiplication of two vectors.
 
VectorNoperator*= (float s)
 Component-wise multiplication of a vector by a scalar.
 
Vector4 operator/ (const Vector4 &rhs) const
 Component-wise division of two vectors.
 
Vector4 operator/ (float s) const
 Component-wise division of a vector by a scalar.
 
VectorNoperator/= (const Vector4 &rhs)
 Component-wise division of two vectors.
 
VectorNoperator/= (float s)
 Component-wise division of a vector by a scalar.
 
float getMagnitude () const
 Return the magnitude of the vector.
 
Vector4 getNormalized () const
 Return a normalized vector.
 
float dot (const Vector4 &rhs) const
 Return the dot product of two vectors.
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
float * data ()
 Return a pointer to the underlying data array.
 
const float * data () const
 Return a const pointer to the underlying data array.
 

Static Public Member Functions

static Quaternion createFromAxisAngle (const Vector3 &v, float a)
 
- Static Public Member Functions inherited from VectorN< Vector4, float, 4 >
static constexpr size_t numElements ()
 Return the number of scalar elements for the vector.
 

Static Public Attributes

static const Quaternion IDENTITY
 

Additional Inherited Members

- Public Types inherited from VectorN< Vector4, float, 4 >
using Iterator = typename std::array< float, N >::iterator
 
using ConstIterator = typename std::array< float, N >::const_iterator
 
- Protected Attributes inherited from VectorN< Vector4, float, 4 >
std::array< float, N > _arr
 

Detailed Description

A quaternion vector.


The documentation for this class was generated from the following files: