Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::animation::BaseTrack< Seq > Class Template Reference
+ Inheritance diagram for inviwo::animation::BaseTrack< Seq >:

Public Types

using seq_type = Seq
 
using key_type = typename Seq::key_type
 
using value_type = typename Seq::value_type
 
using iterator = util::IndirectIterator<typename std::vector<std::unique_ptr<Seq>>::iterator>
 
using const_iterator
 

Public Member Functions

 BaseTrack (const std::string &name, size_t priority=0)
 
virtual bool isEnabled () const override
 
virtual void setEnabled (bool enabled) override
 
virtual const std::string & getName () const override
 
virtual void setName (const std::string &name) override
 
virtual size_t getPriority () const override
 
virtual void setPriority (size_t priority) override
 
virtual Seconds getFirstTime () const override
 
virtual Seconds getLastTime () const override
 
virtual std::vector< Seconds > getAllTimes () const override
 
virtual size_t size () const override
 
virtual bool empty () const override
 
virtual Seq & operator[] (size_t i) override
 
virtual const Seq & operator[] (size_t i) const override
 
virtual const Seq & getFirst () const override
 
virtual Seq & getFirst () override
 
virtual const Seq & getLast () const override
 
virtual Seq & getLast () override
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
virtual key_type * add (Seconds time, bool asNewSequence) override
 
virtual Seq * add (std::unique_ptr< KeyframeSequence > sequence) override
 
virtual Seq * add (std::unique_ptr< Seq > sequence)
 
virtual std::unique_ptr< KeyframeSequenceremove (size_t i) override
 
virtual std::unique_ptr< Keyframeremove (Keyframe *key) override
 
virtual std::unique_ptr< KeyframeSequenceremove (KeyframeSequence *seq) override
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
virtual std::unique_ptr< key_type > createKeyframe (Seconds time) const
 
- Public Member Functions inherited from inviwo::animation::Track
virtual ~Track ()=default
 
virtual Trackclone () const =0
 
virtual std::string getClassIdentifier () const =0
 
virtual AnimationTimeState operator() (Seconds from, Seconds to, AnimationState state) const =0
 
- Public Member Functions inherited from inviwo::Serializable
- Public Member Functions inherited from inviwo::Observable< TrackObserver >
 Observable (const Observable< TrackObserver > &other)
 
 Observable (Observable< TrackObserver > &&other) noexcept
 
Observable< TrackObserver > & operator= (const Observable< TrackObserver > &other)
 
Observable< TrackObserver > & operator= (Observable< TrackObserver > &&other) noexcept
 
void addObserver (TrackObserver *observer)
 
void removeObserver (TrackObserver *observer)
 
virtual void startBlockingNotifications () override final
 
virtual void stopBlockingNotifications () override final
 
- Public Member Functions inherited from inviwo::ObservableInterface
- Public Member Functions inherited from inviwo::animation::KeyframeSequenceObserver
virtual void onKeyframeAdded (Keyframe *, KeyframeSequence *)
 
virtual void onKeyframeRemoved (Keyframe *, KeyframeSequence *)
 
virtual void onKeyframeSequenceSelectionChanged (KeyframeSequence *)
 
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Protected Member Functions

 BaseTrack (const BaseTrack &other)
 
 BaseTrack (BaseTrack &&other)=default
 
BaseTrackoperator= (const BaseTrack &)
 
BaseTrackoperator= (BaseTrack &&other)=default
 
virtual void onKeyframeSequenceMoved (KeyframeSequence *seq) override
 
key_type * addToClosestSequence (std::unique_ptr< key_type > key)
 
- Protected Member Functions inherited from inviwo::animation::TrackObservable
void notifyKeyframeSequenceAdded (Track *t, KeyframeSequence *s)
 
void notifyKeyframeSequenceRemoved (Track *t, KeyframeSequence *s)
 
void notifyFirstMoved (Track *t)
 
void notifyLastMoved (Track *t)
 
void notifyEnabledChanged (Track *t)
 
void notifyNameChanged (Track *t)
 
void notifyPriorityChanged (Track *t)
 
- Protected Member Functions inherited from inviwo::Observable< TrackObserver >
void forEachObserver (C callback)
 
- Protected Member Functions inherited from inviwo::ObservableInterface
void addObservationHelper (Observer *observer)
 
void removeObservationHelper (Observer *observer)
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 

Additional Inherited Members

- Protected Attributes inherited from inviwo::Observer
std::unordered_set< ObservableInterface * > observables_
 

Member Typedef Documentation

◆ const_iterator

template<typename Seq >
using inviwo::animation::BaseTrack< Seq >::const_iterator
Initial value:
util::IndirectIterator<typename std::vector<std::unique_ptr<Seq>>::const_iterator>

Member Function Documentation

◆ add() [1/3]

template<typename Seq >
virtual key_type * inviwo::animation::BaseTrack< Seq >::add ( Seconds time,
bool asNewSequence )
overridevirtual

Add a Keyframe at time using default values and return the added keyframe. The Keyframe is added to a new KeyframeSequence if asNewSequence is true, otherwise it is added to the KeyframeSequence at, or before, time. A KeyframeSequence is added to the Track if none exists.

Tracks should override createKeyframe(Seconds time) to customize Keyframe creation.

Implements inviwo::animation::Track.

◆ add() [2/3]

template<typename Seq >
virtual Seq * inviwo::animation::BaseTrack< Seq >::add ( std::unique_ptr< KeyframeSequence > sequence)
overridevirtual

Add KeyframeSequence and call KeyframeSequenceObserverble::notifyKeyframeSequenceAdded

Exceptions
Exceptionif KeyframeSequence is not compatible with BaseTrack<Seq>
Exceptionif KeyframeSequence overlaps existing sequences
See also
BaseTrack::add(std::unique_ptr<Seq> sequence)

Implements inviwo::animation::Track.

◆ add() [3/3]

template<typename Seq >
virtual Seq * inviwo::animation::BaseTrack< Seq >::add ( std::unique_ptr< Seq > sequence)
virtual

Add KeyframeSequence and call KeyframeSequenceObserverble::notifyKeyframeSequenceAdded

Exceptions
Exceptionif KeyframeSequence overlaps existing sequences

◆ deserialize()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::deserialize ( Deserializer & d)
overridevirtual

◆ empty()

template<typename Seq >
virtual bool inviwo::animation::BaseTrack< Seq >::empty ( ) const
overridevirtual

◆ getAllTimes()

template<typename Seq >
virtual std::vector< Seconds > inviwo::animation::BaseTrack< Seq >::getAllTimes ( ) const
overridevirtual

◆ getFirst() [1/2]

template<typename Seq >
virtual const Seq & inviwo::animation::BaseTrack< Seq >::getFirst ( ) const
overridevirtual

◆ getFirst() [2/2]

template<typename Seq >
virtual Seq & inviwo::animation::BaseTrack< Seq >::getFirst ( )
overridevirtual

◆ getFirstTime()

template<typename Seq >
virtual Seconds inviwo::animation::BaseTrack< Seq >::getFirstTime ( ) const
overridevirtual

◆ getLast() [1/2]

template<typename Seq >
virtual const Seq & inviwo::animation::BaseTrack< Seq >::getLast ( ) const
overridevirtual

◆ getLast() [2/2]

template<typename Seq >
virtual Seq & inviwo::animation::BaseTrack< Seq >::getLast ( )
overridevirtual

◆ getLastTime()

template<typename Seq >
virtual Seconds inviwo::animation::BaseTrack< Seq >::getLastTime ( ) const
overridevirtual

◆ getName()

template<typename Seq >
virtual const std::string & inviwo::animation::BaseTrack< Seq >::getName ( ) const
overridevirtual

◆ getPriority()

template<typename Seq >
virtual size_t inviwo::animation::BaseTrack< Seq >::getPriority ( ) const
overridevirtual

Return Track priority (0 is highest)

Implements inviwo::animation::Track.

◆ isEnabled()

template<typename Seq >
virtual bool inviwo::animation::BaseTrack< Seq >::isEnabled ( ) const
overridevirtual

◆ onKeyframeSequenceMoved()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::onKeyframeSequenceMoved ( KeyframeSequence * seq)
overrideprotectedvirtual

◆ operator[]() [1/2]

template<typename Seq >
virtual const Seq & inviwo::animation::BaseTrack< Seq >::operator[] ( size_t i) const
overridevirtual

◆ operator[]() [2/2]

template<typename Seq >
virtual Seq & inviwo::animation::BaseTrack< Seq >::operator[] ( size_t i)
overridevirtual

◆ remove() [1/3]

template<typename Seq >
virtual std::unique_ptr< Keyframe > inviwo::animation::BaseTrack< Seq >::remove ( Keyframe * key)
overridevirtual

◆ remove() [2/3]

template<typename Seq >
virtual std::unique_ptr< KeyframeSequence > inviwo::animation::BaseTrack< Seq >::remove ( KeyframeSequence * seq)
overridevirtual

◆ remove() [3/3]

template<typename Seq >
virtual std::unique_ptr< KeyframeSequence > inviwo::animation::BaseTrack< Seq >::remove ( size_t i)
overridevirtual

Remove KeyframeSequence at index i and call TrackObserver::notifyKeyframeSequenceRemoved

Implements inviwo::animation::Track.

◆ serialize()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::serialize ( Serializer & s) const
overridevirtual

◆ setEnabled()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::setEnabled ( bool enabled)
overridevirtual

◆ setName()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::setName ( const std::string & name)
overridevirtual

Set Track name. Used when displaying the track.

Implements inviwo::animation::Track.

◆ setPriority()

template<typename Seq >
virtual void inviwo::animation::BaseTrack< Seq >::setPriority ( size_t priority)
overridevirtual

Set priority (0 is highest). The Track with highest priority is evaluated first at a given time by Animation.

Implements inviwo::animation::Track.

◆ size()

template<typename Seq >
virtual size_t inviwo::animation::BaseTrack< Seq >::size ( ) const
overridevirtual

Return the number of KeyframeSequences in the track.

Implements inviwo::animation::Track.


The documentation for this class was generated from the following file: