Browse Source

SceneGraph: add DualQuaternionTransformation::rotate[XYZ]() overloads.

They only pass the arguments to original implementation but return
proper type to avoid weird issues with different method chaining order.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
fe3a73aab2
  1. 16
      src/SceneGraph/DualQuaternionTransformation.h

16
src/SceneGraph/DualQuaternionTransformation.h

@ -148,6 +148,22 @@ class DualQuaternionTransformation: public AbstractTranslationRotation3D<T> {
return this;
}
/* Overloads to remove WTF-factor from method chaining order */
#ifndef DOXYGEN_GENERATING_OUTPUT
inline DualQuaternionTransformation<T>* rotateX(Math::Rad<T> angle, TransformationType type = TransformationType::Global) override {
AbstractTranslationRotation3D<T>::rotateX(angle, type);
return this;
}
inline DualQuaternionTransformation<T>* rotateY(Math::Rad<T> angle, TransformationType type = TransformationType::Global) override {
AbstractTranslationRotation3D<T>::rotateY(angle, type);
return this;
}
inline DualQuaternionTransformation<T>* rotateZ(Math::Rad<T> angle, TransformationType type = TransformationType::Global) override {
AbstractTranslationRotation3D<T>::rotateZ(angle, type);
return this;
}
#endif
protected:
/* Allow construction only from Object */
inline explicit DualQuaternionTransformation() = default;

Loading…
Cancel
Save