![]() |
Inviwo
0.9.10.1
Inviwo documentation
|
#include <animation.h>
Public Types | |
using | iterator = util::IndirectIterator< typename std::vector< std::unique_ptr< Track > >::iterator > |
using | const_iterator = util::IndirectIterator< typename std::vector< std::unique_ptr< Track > >::const_iterator > |
Public Member Functions | |
Animation (const Animation &)=delete | |
Animation & | operator= (const Animation &that)=delete |
AnimationTimeState | operator() (Seconds from, Seconds to, AnimationState state) const |
bool | empty () const |
size_t | size () const |
Track & | operator[] (size_t i) |
const Track & | operator[] (size_t i) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
void | add (std::unique_ptr< Track > track) |
std::unique_ptr< Track > | remove (size_t i) |
std::unique_ptr< Track > | remove (const std::string &id) |
std::unique_ptr< Keyframe > | remove (Keyframe *key) |
std::unique_ptr< KeyframeSequence > | remove (KeyframeSequence *seq) |
void | clear () |
std::vector< Seconds > | getAllTimes () const |
Seconds | getFirstTime () const |
Seconds | getLastTime () const |
virtual void | serialize (Serializer &s) const override |
virtual void | deserialize (Deserializer &d) override |
![]() | |
Observable (const Observable< AnimationObserver > &other) | |
Observable (Observable< AnimationObserver > &&other) | |
Observable< AnimationObserver > & | operator= (const Observable< AnimationObserver > &other) |
Observable< AnimationObserver > & | operator= (Observable< AnimationObserver > &&other) |
void | addObserver (AnimationObserver *observer) |
void | removeObserver (AnimationObserver *observer) |
virtual void | startBlockingNotifications () override final |
virtual void | stopBlockingNotifications () override final |
![]() | |
virtual void | onKeyframeSequenceAdded (Track *, KeyframeSequence *) |
virtual void | onKeyframeSequenceRemoved (Track *, KeyframeSequence *) |
virtual void | onEnabledChanged (Track *) |
virtual void | onIdentifierChanged (Track *) |
virtual void | onNameChanged (Track *) |
![]() | |
Observer (const Observer &other) | |
Observer (Observer &&other) | |
Observer & | operator= (Observer &&other) |
Observer & | operator= (const Observer &other) |
virtual | ~Observer () |
void | removeObservation (ObservableInterface *observable) |
void | removeObservations () |
Additional Inherited Members | |
![]() | |
using | ObservableSet = std::unordered_set< ObservableInterface * > |
![]() | |
void | notifyTrackAdded (Track *track) |
void | notifyTrackRemoved (Track *track) |
void | notifyFirstMoved () |
void | notifyLastMoved () |
![]() | |
void | forEachObserver (C callback) |
![]() | |
void | addObservationHelper (Observer *observer) |
void | removeObservationHelper (Observer *observer) |
![]() | |
void | addObservation (ObservableInterface *observable) |
![]() | |
ObservableSet | observables_ |
Animation data structure, owns a list of tracks. Each Track usually represents a value to be animated.
void inviwo::animation::Animation::clear | ( | ) |
Remove all tracks. Calls TrackObserver::notifyTrackRemoved for each removed track.
std::vector< Seconds > inviwo::animation::Animation::getAllTimes | ( | ) | const |
Return a sorted list, in ascending order, of all Keyframe times existing in the animation.
Seconds inviwo::animation::Animation::getFirstTime | ( | ) | const |
Return time of first Keyframe in all tracks, or 0 if no track exist.
Seconds inviwo::animation::Animation::getLastTime | ( | ) | const |
Return time of last Keyframe in all tracks, or 0 if no track exist.
std::unique_ptr< Track > inviwo::animation::Animation::remove | ( | size_t | i | ) |
Remove tracks at index i, indicating the order in which the track was added, not the order in which they are sorted by Track priority. No range check is done. Calls TrackObserver::notifyTrackRemoved after removing track.
std::unique_ptr< Track > inviwo::animation::Animation::remove | ( | const std::string & | id | ) |
Remove tracks based on Track::getIdentifier Does nothing if no match was found. Calls TrackObserver::notifyTrackRemoved after removing track.
Remove Keyframe if matching any of the Keyframes in the tracks. Calls TrackObserver::notifyKeyframeRemoved after removing Keyframe. Removes the KeyFrameSequence owning the Keyframe if it does not contain any Keyframe after removal, thereby calling KeyFrameSequenceObserver::notifyKeyframeSequenceRemoved Does nothing if no match was found.
std::unique_ptr< KeyframeSequence > inviwo::animation::Animation::remove | ( | KeyframeSequence * | seq | ) |
Remove KeyframeSequence if matching any of the Sequences in the tracks. Calls KeyFrameSequenceObserver::notifyKeyframeSequenceRemoved for the sequence removed and TrackObserver::notifyKeyframeRemoved for every removed keyframe. Does nothing if no match was found.