template<UnsignedInt dimensions, class T, class TranslationType = T>
Magnum::SceneGraph::AbstractTranslation class

Base transformation for two-dimensional scenes supporting translation.

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<dimensions, T>
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.

Public functions

auto translate(const VectorTypeFor<dimensions, TranslationType>& vector) -> AbstractTranslation<dimensions, T, TranslationType>&
Translate the object.
auto translateLocal(const VectorTypeFor<dimensions, TranslationType>& vector) -> AbstractTranslation<dimensions, T, TranslationType>&
Translate the 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 the 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 the object as a local transformation.

Similar to the above, except that the transformation is applied before all others.