48 #ifndef ACG_DUALQUATERNION_HH 49 #define ACG_DUALQUATERNION_HH 54 #include "QuaternionT.hh" 79 template <
class Scalar>
109 Scalar _Dw, Scalar _Dx, Scalar _Dy, Scalar _Dz);
118 DualQuaternionT(
const Vec3& _translation,
const Quaternion& _rotation);
129 static DualQuaternion
zero();
138 DualQuaternion
invert()
const;
144 bool operator==(
const DualQuaternion& _other)
const;
145 bool operator!=(
const DualQuaternion& _other)
const;
148 DualQuaternion
operator+(
const DualQuaternion& _other)
const;
149 DualQuaternion&
operator+=(
const DualQuaternion& _other);
152 DualQuaternion
operator-(
const DualQuaternion& _other)
const;
153 DualQuaternion&
operator-=(
const DualQuaternion& _other);
156 DualQuaternion
operator*(
const DualQuaternion& _q)
const;
159 DualQuaternion
operator*(
const Scalar& _scalar)
const;
162 DualQuaternion&
operator*=(
const DualQuaternion& _q);
168 template <
typename VectorType>
169 static DualQuaternion
interpolate(VectorType& _weights,
const std::vector<DualQuaternion>& _dualQuaternions);
190 #if defined(INCLUDE_TEMPLATES) && !defined(ACG_DUALQUATERNIONT_C) 191 #define ACG_QUATERNIONT_TEMPLATES 192 #include "DualQuaternionT_impl.hh" 195 #endif // ACG_DUALQUATERNION_HH defined Namespace providing different geometric functions concerning angles.
bool operator!=(const DualQuaternion &_other) const
dual quaternion comparison
Quaternion real_
real and dual quaternion parts
void printInfo()
print some info about the DQ
void normalize()
normalize dual quaternion
DualQuaternion & operator-=(const DualQuaternion &_other)
substraction
DualQuaternion operator-(const DualQuaternion &_other) const
substraction
DualQuaternion conjugate() const
conjugate dual quaternion
DualQuaternion invert() const
invert dual quaternion
DualQuaternion operator*(const DualQuaternion &_q) const
dualQuaternion * dualQuaternion
Vec3 transform_vector(const Vec3 &_point) const
Transform a vector with the dual quaternion.
DualQuaternion & operator+=(const DualQuaternion &_other)
addition
DualQuaternion & operator*=(const DualQuaternion &_q)
dualQuaternion *= dualQuaternion
static DualQuaternion interpolate(VectorType &_weights, const std::vector< DualQuaternion > &_dualQuaternions)
linear interpolation of dual quaternions. Result is normalized afterwards
DualQuaternion operator+(const DualQuaternion &_other) const
addition
DualQuaternion class for representing rigid motions in 3d.
DualQuaternionT()
Default constructor ( constructs an identity dual quaternion )
bool operator==(const DualQuaternion &_other) const
dual quaternion comparison
static DualQuaternion zero()
zero dual quaternion [ R(0, 0, 0, 0), D(0,0,0,0) ]
static DualQuaternion identity()
identity dual quaternion [ R(1, 0, 0, 0), D(0,0,0,0) ]
Vec3 transform_point(const Vec3 &_point) const
Transform a point with the dual quaternion.
Scalar & operator[](const unsigned int &b)
Access as one big vector.