58 #ifndef ACG_DUALQUATERNION_HH 59 #define ACG_DUALQUATERNION_HH 64 #include "QuaternionT.hh" 89 template <
class Scalar>
119 Scalar _Dw, Scalar _Dx, Scalar _Dy, Scalar _Dz);
128 DualQuaternionT(
const Vec3& _translation,
const Quaternion& _rotation);
139 static DualQuaternion
zero();
148 DualQuaternion
invert()
const;
154 bool operator==(
const DualQuaternion& _other)
const;
155 bool operator!=(
const DualQuaternion& _other)
const;
158 DualQuaternion
operator+(
const DualQuaternion& _other)
const;
159 DualQuaternion&
operator+=(
const DualQuaternion& _other);
162 DualQuaternion
operator-(
const DualQuaternion& _other)
const;
163 DualQuaternion&
operator-=(
const DualQuaternion& _other);
166 DualQuaternion
operator*(
const DualQuaternion& _q)
const;
169 DualQuaternion
operator*(
const Scalar& _scalar)
const;
172 DualQuaternion&
operator*=(
const DualQuaternion& _q);
178 template <
typename VectorType>
179 static DualQuaternion
interpolate(VectorType& _weights,
const std::vector<DualQuaternion>& _dualQuaternions);
200 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_DUALQUATERNIONT_C) 201 #define ACG_QUATERNIONT_TEMPLATES 202 #include "DualQuaternionT.cc" 205 #endif // ACG_DUALQUATERNION_HH defined static DualQuaternion zero()
zero dual quaternion [ R(0, 0, 0, 0), D(0,0,0,0) ]
DualQuaternion class for representing rigid motions in 3d.
DualQuaternion & operator+=(const DualQuaternion &_other)
addition
DualQuaternionT()
Default constructor ( constructs an identity dual quaternion )
DualQuaternion operator*(const DualQuaternion &_q) const
dualQuaternion * dualQuaternion
Quaternion real_
real and dual quaternion parts
DualQuaternion & operator*=(const DualQuaternion &_q)
dualQuaternion *= dualQuaternion
Vec3 transform_vector(const Vec3 &_point) const
Transform a vector with the dual quaternion.
DualQuaternion & operator-=(const DualQuaternion &_other)
substraction
DualQuaternion conjugate() const
conjugate dual quaternion
bool operator==(const DualQuaternion &_other) const
dual quaternion comparison
static DualQuaternion interpolate(VectorType &_weights, const std::vector< DualQuaternion > &_dualQuaternions)
linear interpolation of dual quaternions. Result is normalized afterwards
DualQuaternion invert() const
invert dual quaternion
Namespace providing different geometric functions concerning angles.
bool operator!=(const DualQuaternion &_other) const
dual quaternion comparison
Vec3 transform_point(const Vec3 &_point) const
Transform a point with the dual quaternion.
void printInfo()
print some info about the DQ
DualQuaternion operator-(const DualQuaternion &_other) const
substraction
DualQuaternion operator+(const DualQuaternion &_other) const
addition
static DualQuaternion identity()
identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ]
Scalar & operator[](const unsigned int &b)
Access as one big vector.
void normalize()
normalize dual quaternion