AngryDude
 All Classes Namespaces Files Functions Variables Macros
Classes | Functions
DualQuaternion.hpp File Reference
#include <cmath>
#include <type_traits>
Include dependency graph for DualQuaternion.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Quaternion
 Quaternions are an extension of real numbers used to represent rotations in 3D. More...
 
class  DualQuaternion
 

Functions

const Quaternion operator+ (const Quaternion &a, const Quaternion &b)
 Returns a Quaternion that is the sum of quaternions a and b (component-wise sum). More...
 
const Quaternion operator* (const Quaternion &a, const Quaternion &b)
 Quaternion multiplication. More...
 
const Quaternion conjugate (const Quaternion &q)
 
const DualQuaternion operator* (const DualQuaternion &a, const DualQuaternion &b)
 
const DualQuaternion conjugateDual (const DualQuaternion &dq)
 

Function Documentation

const Quaternion conjugate ( const Quaternion q)
inline
const DualQuaternion conjugateDual ( const DualQuaternion dq)
inline

Both quaternion and dual number conjugation.

const Quaternion operator* ( const Quaternion a,
const Quaternion b 
)
inline

Quaternion multiplication.

const DualQuaternion operator* ( const DualQuaternion a,
const DualQuaternion b 
)
inline

In short: the idea of POD (plain old datatypes) classes is to support static initialization and have the same memory layout as in C. C++11 says a class is POD if it is both trivial and standard layout. It is ok to use memcpy over trivial classes. Standard layout class has the same memory layout as the equivalent C struct.

a*b = (a0 + eps*ae)*(b0 + eps*be) = a0*b0 + eps*(a0*be + ae*b0)

const Quaternion operator+ ( const Quaternion a,
const Quaternion b 
)
inline

Returns a Quaternion that is the sum of quaternions a and b (component-wise sum).