Inviwo 0.9.12-pre
Inviwo documentation
|
Responsible for animations saved in the workspace and ensuring that there always is at least one main Animation. More...
#include <workspaceanimations.h>
Public Types | |
using | OnChangedDispatcher = Dispatcher<void(size_t, Animation&)> |
using | const_iterator |
using | iterator |
Public Member Functions | |
WorkspaceAnimations (InviwoApplication *app, AnimationManager &manager, AnimationModule &module) | |
WorkspaceAnimations (const WorkspaceAnimations &)=delete | |
WorkspaceAnimations (WorkspaceAnimations &&)=delete | |
WorkspaceAnimations & | operator= (const WorkspaceAnimations &)=delete |
WorkspaceAnimations & | operator= (WorkspaceAnimations &&)=delete |
Animation & | get (size_t index) |
std::vector< Animation * > | get (std::string_view name) |
Animation & | operator[] (size_t i) |
const Animation & | operator[] (size_t i) const |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
Animation & | add (std::string_view name) |
Animation & | add (Animation anim) |
Animation & | insert (size_t index, std::string_view name) |
Animation & | insert (const_iterator position, std::string_view name) |
void | erase (size_t index) |
void | erase (const_iterator position) |
void | clear () |
size_t | size () const |
void | setMainAnimation (Animation &anim) |
Set specified Animation to be the MainAnimation. A copy of the Animation will be added in case the it has not been added before. The AnimationController in MainAnimation will notify its observers of the animation change. | |
MainAnimation & | getMainAnimation () |
const MainAnimation & | getMainAnimation () const |
const_iterator | find (const Animation *anim) const |
iterator | find (const Animation *anim) |
Public Member Functions inherited from inviwo::animation::AnimationControllerObserver | |
virtual void | onStateChanged (AnimationController *, AnimationState, AnimationState) |
virtual void | onTimeChanged (AnimationController *, Seconds, Seconds) |
Public Member Functions inherited from inviwo::Observer | |
Observer (const Observer &other) | |
Observer (Observer &&other) | |
Observer & | operator= (Observer &&other) |
Observer & | operator= (const Observer &other) |
virtual | ~Observer () |
void | removeObservation (ObservableInterface *observable) |
void | removeObservations () |
Public Member Functions inherited from inviwo::animation::AnimationObserver | |
virtual void | onFirstMoved () |
virtual void | onLastMoved () |
Public Member Functions inherited from inviwo::animation::TrackObserver | |
virtual void | onFirstMoved (Track *) |
virtual void | onLastMoved (Track *) |
Public Member Functions inherited from inviwo::animation::KeyframeSequenceObserver | |
Public Member Functions inherited from inviwo::animation::KeyframeObserver |
Public Attributes | |
OnChangedDispatcher | onChanged_ |
Additional Inherited Members | |
Protected Member Functions inherited from inviwo::Observer | |
void | addObservation (ObservableInterface *observable) |
Protected Attributes inherited from inviwo::Observer | |
std::unordered_set< ObservableInterface * > | observables_ |
Responsible for animations saved in the workspace and ensuring that there always is at least one main Animation.
One of its animations is set to be the MainAnimation. The Animation used by MainAnimation must be set through WorkspaceAnimations.
WorkspaceAnimations is responsible for clearing, saving, and loading animations when the workspace is cleared, saved, or loaded. It will also call notifyObserversProcessorNetworkChanged whenever its animations change to enable undo/redo.
using inviwo::animation::WorkspaceAnimations::OnChangedDispatcher = Dispatcher<void(size_t, Animation&)> |
Animation & inviwo::animation::WorkspaceAnimations::add | ( | std::string_view | name | ) |
Add an empty Animation with specified name.
void inviwo::animation::WorkspaceAnimations::clear | ( | ) |
Removes all animations leaving an empty Animation, which is set to be the MainAnimation. The size() will be 1 after clearing.
void inviwo::animation::WorkspaceAnimations::erase | ( | size_t | index | ) |
Removes the animation and adjusts the main animation to the next available index if needed. An empty animation will be added if all animations are erased.
std::vector< Animation * > inviwo::animation::WorkspaceAnimations::get | ( | std::string_view | name | ) |