Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::animation::AnimationController Class Reference

#include <modules/animation/animationcontroller.h>

Inheritance diagram for inviwo::animation::AnimationController:

Public Member Functions

 AnimationController (Animation &animation, AnimationManager &manager, InviwoApplication *app=util::getInviwoApplication())
Seconds deltaTime () const
void eval (Seconds oldTime, Seconds newTime)
 Asks the animation to update the network to reflect the new time.
AnimationgetAnimation ()
 Returns mutable controlled animation.
const AnimationgetAnimation () const
 Returns controlled animation.
Seconds getCurrentTime () const
InviwoApplicationgetInviwoApplication () override
PlaybackDirection getPlaybackDirection () const
 Returns the playback direction used during tick.
const AnimationState & getState () const
 Returns the current state of the controller, whether it is playing, or pausing, and such.
void jumpToNextControlKeyframe ()
void jumpToNextKeyframe ()
void jumpToPrevControlKeyframe ()
void jumpToPrevKeyframe ()
void pause ()
 Pause animation.
void play ()
 Play animation.
void render ()
 Render the animation into an image sequence.
void setAnimation (Animation &animation)
void setPlaybackDirection (PlaybackDirection newDirection)
void setState (AnimationState newState)
void stop ()
void tick ()
 Advances the animation to the next time step in playing state.
Public Member Functions inherited from inviwo::Observable< AnimationControllerObserver >
void addObserver (AnimationControllerObserver *observer)
bool isObservedBy (AnimationControllerObserver *observer) const
Observable< AnimationControllerObserver > & operator= (const Observable< AnimationControllerObserver > &other)
void removeObserver (AnimationControllerObserver *observer)
virtual void startBlockingNotifications () override final
virtual void stopBlockingNotifications () override final
Public Member Functions inherited from inviwo::PropertyOwner
template<typename... Ts>
void addProperties (Ts &... properties)
void addProperty (Property &property)
void addProperty (Property *property, bool owner=true)
PropertyaddProperty (std::unique_ptr< Property > property)
iterator begin ()
const_iterator begin () const
const_iterator cbegin () const
const_iterator cend () const
virtual void clear ()
 Remove all properties; Owned properties will be deleted.
virtual void deserialize (Deserializer &d) override
bool empty () const
iterator end ()
const_iterator end () const
const_iterator find (Property *property) const
const std::vector< CompositeProperty * > & getCompositeProperties () const
virtual const std::string & getIdentifier () const
InvalidationLevel getInvalidationLevel () const
virtual PropertyOwner * getOwner ()
virtual const PropertyOwner * getOwner () const
virtual ProcessorgetProcessor ()
virtual const ProcessorgetProcessor () const
const std::vector< Property * > & getProperties () const
template<class T>
std::vector< T * > getPropertiesByType (bool recursiveSearch=false) const
std::vector< Property * > getPropertiesRecursive () const
std::vector< Property * > & getPropertiesRecursive (std::vector< Property * > &destination) const
template<std::derived_from< Property > T = Property>
T * getProperty (std::string_view identifier)
PropertygetPropertyByIdentifier (std::string_view identifier, bool recursiveSearch=false) const
PropertygetPropertyByPath (std::string_view path) const
void insertProperty (size_t index, Property &property)
 insert property property at position index If index is not valid, the property is appended.
virtual void insertProperty (size_t index, Property *property, bool owner=true)
 insert property property at position index If index is not valid, the property is appended.
PropertyinsertProperty (size_t index, std::unique_ptr< Property > property)
 insert property property at position index If index is not valid, the property is appended.
virtual void invalidate (InvalidationLevel invalidationLevel, Property *modifiedProperty)
virtual void invokeEvent (Event *event) override
virtual bool isValid () const
virtual bool move (Property *property, size_t newIndex)
PropertyOwner & operator= (const PropertyOwner &that)=delete
Propertyoperator[] (size_t)
const Propertyoperator[] (size_t) const
virtual PropertyremoveProperty (iterator it)
PropertyremoveProperty (Property &property)
PropertyremoveProperty (Property *property)
PropertyremoveProperty (size_t index)
 remove property referred to by index
PropertyremoveProperty (std::string_view identifier)
virtual void resetAllProperties ()
virtual void serialize (Serializer &s) const override
virtual void setAllPropertiesCurrentStateAsDefault ()
virtual void setValid ()
size_t size () const
virtual ~PropertyOwner ()
 Removes all properties and notifies its observers of the removal.
Public Member Functions inherited from inviwo::PropertyOwnerObservable
void notifyObserversDidAddProperty (Property *property, size_t index)
void notifyObserversDidRemoveProperty (PropertyOwner *owner, Property *property, size_t index)
void notifyObserversWillAddProperty (PropertyOwner *owner, Property *property, size_t index)
void notifyObserversWillRemoveProperty (Property *property, size_t index)
Public Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
void addObserver (PropertyOwnerObserver *observer)
bool isObservedBy (PropertyOwnerObserver *observer) const
Observable< PropertyOwnerObserver > & operator= (const Observable< PropertyOwnerObserver > &other)
void removeObserver (PropertyOwnerObserver *observer)
virtual void startBlockingNotifications () override final
virtual void stopBlockingNotifications () override final

Public Attributes

CompositeProperty controlOptions
StringProperty exportBaseName_
BoolCompositeProperty exportOptions_
DirectoryProperty exportOutputDirectory_
BoolProperty exportOverwrite_
OptionProperty< FileExtensionexportWriter_
DoubleProperty framesPerSecond
ButtonProperty insertControlTrack
ButtonProperty insertInvalidationTrack
OptionProperty< PlaybackMode > playMode
CompositeProperty playOptions
DoubleMinMaxProperty playWindow
OptionPropertyInt playWindowMode
ButtonProperty renderAction
ButtonProperty renderActionStop
DoubleProperty renderFPS
CompositeProperty renderOptions
DoubleMinMaxProperty renderWindow
OptionPropertyInt renderWindowMode

Protected Member Functions

void setTime (Seconds time)
 Low-level setting of currentTime_. Use eval() to set time in the public interface.
Protected Member Functions inherited from inviwo::animation::AnimationControllerObservable
void notifyAnimationChanged (AnimationController *controller, Animation *oldAnimation, Animation *newAnimation)
void notifyStateChanged (AnimationController *controller, AnimationState prevState, AnimationState newState)
void notifyTimeChanged (AnimationController *controller, Seconds oldTime, Seconds newTime)
Protected Member Functions inherited from inviwo::Observable< AnimationControllerObserver >
void forEachObserver (C callback)
Protected Member Functions inherited from inviwo::ObservableInterface
void addObservationHelper (Observer *observer)
virtual void addObserver (Observer *observer)=0
void removeObservationHelper (Observer *observer)
virtual void removeObserver (Observer *observer)=0
Protected Member Functions inherited from inviwo::PropertyOwner
void forEachProperty (std::function< void(Property &)> callback, bool recursiveSearch=false) const
PropertyOwner & operator= (PropertyOwner &&that)
 PropertyOwner (const PropertyOwner &rhs)
 PropertyOwner (PropertyOwner &&rhs)
Protected Member Functions inherited from inviwo::Observable< PropertyOwnerObserver >
void forEachObserver (C callback)

Protected Attributes

Animationanimation_
 The animation to control, non-owning reference.
InviwoApplicationapp_
 Host application.
Seconds currentTime_
 Current time of the animation. This is an important variable to keep consistent!
PlaybackDirection direction_
AnimationManagermanager_
AnimationState state_
 State of the animation, such as paused or playing or rendering.
Timer timer_
 Timer for calling the tick function is regular intervals.
Protected Attributes inherited from inviwo::PropertyOwner
std::vector< CompositeProperty * > compositeProperties_
std::vector< EventProperty * > eventProperties_
std::vector< std::unique_ptr< Property > > ownedProperties_
std::vector< Property * > properties_

Additional Inherited Members

Public Types inherited from inviwo::PropertyOwner
using const_iterator = std::vector<Property*>::const_iterator
using iterator = std::vector<Property*>::iterator

Detailed Description

The AnimationController is responsible for steering the animation.

It keeps track of the animation time and state. When playing, it should adjust the step sizes to maintain a certain playback speed (frames per second).

Furthermore, it allows to render the animation into an image sequence.

Member Function Documentation

◆ getInviwoApplication()

InviwoApplication * inviwo::animation::AnimationController::getInviwoApplication ( )
inlineoverridevirtual

Implements inviwo::PropertyOwner.


The documentation for this class was generated from the following file:
  • modules/animation/include/modules/animation/animationcontroller.h