template<UnsignedInt dimensions, class T, class TranslationType = T>
TranslationTransformation class
Translation-only transformation.
Uses Math::
Base classes
-
template<UnsignedInt dimensions, class T, class TranslationType = T>class AbstractTranslation<dimensions, T, T>
- 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 the object.
- auto translate(const VectorTypeFor<dimensions, TranslationType>& vector) -> Object<TranslationTransformation<dimensions, T, TranslationType>>&
- Translate the object.
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 the 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 the object.
Returns | Reference to self (for method chaining) |
---|
There is no difference between global and local translation.