template<UnsignedInt dimensions, class T, class TranslationType = T>
TranslationTransformation class
Translation-only transformation.
Contents
Uses Math::
Base classes
-
template<UnsignedInt dimensions, class T, class TranslationType = T>class AbstractTranslation
- Base transformation for two-dimensional scenes supporting translation.
Public types
- using DataType = VectorTypeFor<dimensions, TranslationType>
- Underlying transformation type.
Public functions
- auto transformation() const -> VectorTypeFor<dimensions, TranslationType>
- Object transformation.
- auto setTransformation(const VectorTypeFor<dimensions, TranslationType>& transformation) -> Object<TranslationTransformation<dimensions, T, TranslationType>>&
- Set transformation.
- auto resetTransformation() -> Object<TranslationTransformation<dimensions, T, TranslationType>>&
- Reset object transformation.
- auto transform(const VectorTypeFor<dimensions, TranslationType>& transformation) -> Object<TranslationTransformation<dimensions, T, TranslationType>>&
- Transform object.
- auto translate(const VectorTypeFor<dimensions, TranslationType>& vector) -> Object<TranslationTransformation<dimensions, T, TranslationType>>&
- Translate object.
Private functions
- void doResetTransformation() override final virtual
- Polymorphic implementation for resetTransformation()
- void doTranslate(const VectorTypeFor<dimensions, TranslationType>& vector) override final virtual
- Polymorphic implementation for translate()
- void doTranslateLocal(const VectorTypeFor<dimensions, TranslationType>& vector) override final virtual
- Polymorphic implementation for translateLocal()
Function documentation
template<UnsignedInt dimensions, class T, class TranslationType>
Object<TranslationTransformation<dimensions, T, TranslationType>>& Magnum:: SceneGraph:: TranslationTransformation<dimensions, T, TranslationType>:: setTransformation(const VectorTypeFor<dimensions, TranslationType>& transformation)
Set transformation.
Returns | Reference to self (for method chaining) |
---|
template<UnsignedInt dimensions, class T, class TranslationType>
Object<TranslationTransformation<dimensions, T, TranslationType>>& Magnum:: SceneGraph:: TranslationTransformation<dimensions, T, TranslationType>:: resetTransformation()
Reset object transformation.
Returns | Reference to self (for method chaining) |
---|
template<UnsignedInt dimensions, class T, class TranslationType>
Object<TranslationTransformation<dimensions, T, TranslationType>>& Magnum:: SceneGraph:: TranslationTransformation<dimensions, T, TranslationType>:: transform(const VectorTypeFor<dimensions, TranslationType>& transformation)
Transform object.
Returns | Reference to self (for method chaining) |
---|
Equivalent to translate(), provided only for compatibility with other implementations. There is no difference between global and local transformation.
template<UnsignedInt dimensions, class T, class TranslationType>
Object<TranslationTransformation<dimensions, T, TranslationType>>& Magnum:: SceneGraph:: TranslationTransformation<dimensions, T, TranslationType>:: translate(const VectorTypeFor<dimensions, TranslationType>& vector)
Translate object.
Returns | Reference to self (for method chaining) |
---|
There is no difference between global and local translation.