template<UnsignedInt dimensions, class T, class TranslationType = T>
AbstractTranslation class
Base transformation for two-dimensional scenes supporting translation.
Contents
See Polymorphic access to object transformation for more information.
By default the translation is stored with the same underlying type as resulting transformation matrix, but it's possible to store translation in e.g. integral coordinates while having floating-point transformation matrix.
Base classes
-
template<UnsignedInt dimensions, class T>class AbstractTransformation
- Base for transformations.
Derived classes
-
template<class T>class AbstractBasicTranslationRotation3D
- Base transformation for three-dimensional scenes supporting translation and rotation.
-
template<class T>class AbstractBasicTranslationRotation3D
- Base transformation for three-dimensional scenes supporting translation and rotation.
-
template<class T>class AbstractBasicTranslationRotation2D
- Base transformation for two-dimensional scenes supporting translation and rotation.
-
template<class T>class AbstractBasicTranslationRotation3D
- Base transformation for three-dimensional scenes supporting translation and rotation.
-
template<UnsignedInt dimensions, class T, class TranslationType = T>class TranslationTransformation
- Translation-only transformation.
Public functions
- auto translate(const VectorTypeFor<dimensions, TranslationType>& vector) -> AbstractTranslation<dimensions, T, TranslationType>&
- Translate object.
- auto translateLocal(const VectorTypeFor<dimensions, TranslationType>& vector) -> AbstractTranslation<dimensions, T, TranslationType>&
- Translate object as a local transformation.
Protected functions
- void doTranslate(const VectorTypeFor<dimensions, TranslationType>& vector) pure virtual
- Polymorphic implementation for translate()
- void doTranslateLocal(const VectorTypeFor<dimensions, TranslationType>& vector) pure virtual
- Polymorphic implementation for translateLocal()
Function documentation
template<UnsignedInt dimensions, class T, class TranslationType>
AbstractTranslation<dimensions, T, TranslationType>& Magnum:: SceneGraph:: AbstractTranslation<dimensions, T, TranslationType>:: translate(const VectorTypeFor<dimensions, TranslationType>& vector)
Translate object.
Returns | Reference to self (for method chaining) |
---|
template<UnsignedInt dimensions, class T, class TranslationType>
AbstractTranslation<dimensions, T, TranslationType>& Magnum:: SceneGraph:: AbstractTranslation<dimensions, T, TranslationType>:: translateLocal(const VectorTypeFor<dimensions, TranslationType>& vector)
Translate object as a local transformation.
Similar to the above, except that the transformation is applied before all others.