class new in Git master
#include <Magnum/Ui/AbstractAnimator.h>
AbstractGenericAnimator Base for generic animators.
Base classes
- class AbstractAnimator new in Git master
- Base for animators.
Constructors, destructors, conversion operators
- AbstractGenericAnimator(AnimatorHandle handle) explicit
- Constructor.
- AbstractGenericAnimator(const AbstractGenericAnimator&) deleted
- Copying is not allowed.
- AbstractGenericAnimator(AbstractGenericAnimator&&) noexcept
- Move constructor.
Public functions
- auto operator=(const AbstractGenericAnimator&) -> AbstractGenericAnimator& deleted
- Copying is not allowed.
- auto operator=(AbstractGenericAnimator&&) -> AbstractGenericAnimator& noexcept
- Move assignment.
-
void advance(Containers::
BitArrayView active, const Containers:: StridedArrayView1D<const Float>& factors) - Advance the animations.
Protected functions
- void setLayer(const AbstractLayer& layer)
- Set a layer associated with this animator.
Private functions
-
void doAdvance(Containers::
BitArrayView active, const Containers:: StridedArrayView1D<const Float>& factors) pure virtual - Advance the animations.
Function documentation
Magnum:: Ui:: AbstractGenericAnimator:: AbstractGenericAnimator(AnimatorHandle handle) explicit
Constructor.
Parameters | |
---|---|
handle | Handle returned by AbstractUserInterface:: |
Magnum:: Ui:: AbstractGenericAnimator:: AbstractGenericAnimator(AbstractGenericAnimator&&) noexcept
Move constructor.
Performs a destructive move, i.e. the original object isn't usable afterwards anymore.
void Magnum:: Ui:: AbstractGenericAnimator:: advance(Containers:: BitArrayView active,
const Containers:: StridedArrayView1D<const Float>& factors)
Advance the animations.
Used internally from AbstractUserInterface::
Expects that size of active
and factors
matches capacity(), it's assumed that their contents were filled by update() before. Delegates to doAdvance(), see its documentation for more information.
void Magnum:: Ui:: AbstractGenericAnimator:: setLayer(const AbstractLayer& layer) protected
Set a layer associated with this animator.
Expects that the animator supports AnimatorFeature::layer
into layer() const, making it possible to call create(Nanoseconds, Nanoseconds, DataHandle, UnsignedInt, AnimationFlags), create(Nanoseconds, Nanoseconds, LayerDataHandle, UnsignedInt, AnimationFlags), attach(AnimationHandle, DataHandle), attach(AnimationHandle, LayerDataHandle), attach(AnimatorDataHandle, DataHandle) and attach(AnimatorDataHandle, LayerDataHandle).
A concrete subclass exposing AnimatorFeature::
A corresponding API for an AbstractDataAnimator / AbstractStyleAnimator is AbstractLayer::
void Magnum:: Ui:: AbstractGenericAnimator:: doAdvance(Containers:: BitArrayView active,
const Containers:: StridedArrayView1D<const Float>& factors) pure virtual private
Advance the animations.
Parameters | |
---|---|
active | Animation IDs that are active |
factors | Interpolation factors indexed by animation ID |
Implementation for advance(), which is called from AbstractUserInterface::
The active
and factors
views are guaranteed to have the same size as capacity(). The factors
array is guaranteed to contain values in the range for animations that have a corresponding bit set in active
, calculated equivalently to factor(AnimationHandle) const, and may contain random or uninitialized values for others. This function is always called with at least one active
bit set.