Go to the documentation of this file.
29 #ifndef __DualQuaternion_H__
30 #define __DualQuaternion_H__
52 : w(1), x(0), y(0), z(0), dw(1), dx(0), dy(0), dz(0)
59 : w(fW), x(fX), y(fY), z(fZ), dw(fdW), dx(fdX), dy(fdY), dz(fdZ)
66 this->fromTransformationMatrix(rot);
72 this->fromRotationTranslation(q, trans);
78 memcpy(&w, valptr,
sizeof(
Real)*8);
82 inline Real operator [] (
const size_t i )
const
90 inline Real& operator [] (
const size_t i )
113 return (rhs.
w == w) && (rhs.
x == x) && (rhs.
y == y) && (rhs.
z == z) &&
114 (rhs.
dw == dw) && (rhs.
dx == dx) && (rhs.
dy == dy) && (rhs.
dz == dz);
161 void fromTransformationMatrix (
const Matrix4& kTrans);
164 void toTransformationMatrix (
Matrix4& kTrans)
const;
172 inline _OgreExport friend std::ostream&
operator <<
175 o <<
"DualQuaternion(" << q.w <<
", " << q.x <<
", " << q.y <<
", " << q.z <<
", " << q.dw <<
", " << q.dx <<
", " << q.dy <<
", " << q.dz <<
")";
Real * ptr()
Pointer accessor for direct copying.
DualQuaternion(Real *valptr)
Construct a dual quaternion from 8 manual w/x/y/z/dw/dx/dy/dz values.
DualQuaternion(const Quaternion &q, const Vector3 &trans)
Construct a dual quaternion from a unit quaternion and a translation vector.
DualQuaternion()
Default constructor, initializes to identity rotation (aka 0°), and zero translation (0,...
bool isNaN() const
Check whether this dual quaternion contains valid values.
DualQuaternion(Real fW, Real fX, Real fY, Real fZ, Real fdW, Real fdX, Real fdY, Real fdZ)
Construct from an explicit list of values.
bool operator!=(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
Implementation of a Quaternion, i.e.
Class encapsulating a standard 4x4 homogeneous matrix.
DualQuaternion(const Matrix4 &rot)
Construct a dual quaternion from a transformation matrix.
static bool isNaN(Real f)
void swap(Ogre::SmallVectorImpl< T > &LHS, Ogre::SmallVectorImpl< T > &RHS)
Implement std::swap in terms of SmallVector swap.
void swap(DualQuaternion &other)
Exchange the contents of this dual quaternion with another.
const Real * ptr() const
Pointer accessor for direct copying.
float Real
Software floating point type.
Implementation of a dual quaternion, i.e.
bool operator==(STLAllocator< T, P > const &, STLAllocator< T2, P > const &)
determine equality, can memory from another allocator be released by this allocator,...
Standard 3-dimensional vector.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.