Inviwo  0.9.10.1
Inviwo documentation
inviwo::animation::PropertyTrack< Prop, Key > Class Template Reference

#include <propertytrack.h>

+ Inheritance diagram for inviwo::animation::PropertyTrack< Prop, Key >:

Public Member Functions

 PropertyTrack (Prop *property)
 
virtual ~PropertyTrack ()
 
virtual std::string getClassIdentifier () const override
 
virtual AnimationTimeState operator() (Seconds from, Seconds to, AnimationState state) const override
 
virtual const Prop * getProperty () const override
 
virtual Prop * getProperty () override
 
virtual void setProperty (Property *property) override
 
virtual const std::string & getIdentifier () const override
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
virtual void addKeyFrameUsingPropertyValue (const Property *property, Seconds time, std::unique_ptr< Interpolation > interpolation) override
 
virtual void addKeyFrameUsingPropertyValue (Seconds time, std::unique_ptr< Interpolation > interpolation) override
 
virtual void addSequenceUsingPropertyValue (Seconds time, std::unique_ptr< Interpolation > interpolation) override
 
virtual TracktoTrack () override
 
void setOtherProperty (Property *dstProperty, Keyframe *keyframe) override
 Helper function to set a property (other than the property owned by the track) from a keyframe. More...
 
void updateKeyframeFromProperty (Property *srcProperty, Keyframe *keyframe) override
 Helper function to update the value if a keyframe from a property (other than the property owned by the track) More...
 
- Public Member Functions inherited from inviwo::animation::BaseTrack< KeyframeSequenceTyped< Key > >
 BaseTrack (const std::string &identifier, const std::string &name, size_t priority=0)
 
virtual bool isEnabled () const override
 
virtual void setEnabled (bool enabled) override
 
virtual void setIdentifier (const std::string &identifier) 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 KeyframeSequenceTyped< Key > & operator[] (size_t i) override
 
virtual const KeyframeSequenceTyped< Key > & operator[] (size_t i) const override
 
virtual const KeyframeSequenceTyped< Key > & getFirst () const override
 
virtual KeyframeSequenceTyped< Key > & getFirst () override
 
virtual const KeyframeSequenceTyped< Key > & getLast () const override
 
virtual KeyframeSequenceTyped< Key > & getLast () override
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
virtual void add (Seconds time, bool asNewSequence) override
 
virtual void add (std::unique_ptr< KeyframeSequence > sequence) override
 
virtual void add (std::unique_ptr< KeyframeSequenceTyped< Key > > 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
 
- Public Member Functions inherited from inviwo::animation::Track
virtual ~Track ()=default
 
 Track (const Track &)=delete
 
Trackoperator= (const Track &)=delete
 
- Public Member Functions inherited from inviwo::Observable< TrackObserver >
 Observable (const Observable< TrackObserver > &other)
 
 Observable (Observable< TrackObserver > &&other)
 
Observable< TrackObserver > & operator= (const Observable< TrackObserver > &other)
 
Observable< TrackObserver > & operator= (Observable< TrackObserver > &&other)
 
void addObserver (TrackObserver *observer)
 
void removeObserver (TrackObserver *observer)
 
virtual void startBlockingNotifications () override final
 
virtual void stopBlockingNotifications () override final
 
- 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 ()
 

Static Public Member Functions

static std::string classIdentifier ()
 

Additional Inherited Members

- Public Types inherited from inviwo::animation::BaseTrack< KeyframeSequenceTyped< Key > >
using seq_type = KeyframeSequenceTyped< Key >
 
using key_type = typename KeyframeSequenceTyped< Key > ::key_type
 
using value_type = typename KeyframeSequenceTyped< Key > ::value_type
 
using iterator = util::IndirectIterator< typename std::vector< std::unique_ptr< KeyframeSequenceTyped< Key > > >::iterator >
 
using const_iterator = util::IndirectIterator< typename std::vector< std::unique_ptr< KeyframeSequenceTyped< Key > > >::const_iterator >
 
- Protected Types inherited from inviwo::Observer
using ObservableSet = std::unordered_set< ObservableInterface * >
 
- Protected Member Functions inherited from inviwo::animation::BaseTrack< KeyframeSequenceTyped< Key > >
virtual void onKeyframeSequenceMoved (KeyframeSequence *seq) override
 
void 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 notifyIdentifierChanged (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)
 
- Protected Attributes inherited from inviwo::animation::BaseTrack< KeyframeSequenceTyped< Key > >
bool enabled_
 
std::string identifier_
 
std::string name_
 
size_t priority_
 
std::vector< std::unique_ptr< KeyframeSequenceTyped< Key > > > sequences_
 
- Protected Attributes inherited from inviwo::Observer
ObservableSet observables_
 

Detailed Description

template<typename Prop, typename Key>
class inviwo::animation::PropertyTrack< Prop, Key >

Implementation of BasePropertyTrack and TrackTyped based on templates parameter types for Property and KeyFrame. Exposes functions for adding a KeyFrame and KeyFrameSequence using the current values of the Property.

See also
Track
PropertyTrack
Property

Constructor & Destructor Documentation

◆ ~PropertyTrack()

template<typename Prop , typename Key >
inviwo::animation::PropertyTrack< Prop, Key >::~PropertyTrack ( )
virtualdefault

Remove all keyframe sequences and call TrackObserver::notifyKeyframeSequenceRemoved

Member Function Documentation

◆ operator()()

template<typename Prop , typename Key >
AnimationTimeState inviwo::animation::PropertyTrack< Prop, Key >::operator() ( Seconds  from,
Seconds  to,
AnimationState  state 
) const
overridevirtual

Track of sequences -------—X======X====X--------—X=========X----—X=====X-----— |- case 1-|-case 2-------------—|-case 2-------—|-case 2---—| |-case 2a—|-case 2b—|

Implements inviwo::animation::Track.

◆ setOtherProperty()

template<typename Prop , typename Key >
void inviwo::animation::PropertyTrack< Prop, Key >::setOtherProperty ( Property dstProperty,
Keyframe keyframe 
)
inlineoverridevirtual

Helper function to set a property (other than the property owned by the track) from a keyframe.

Called from inviwo::animation:: KeyframeEditorWidget when creating the widget

Parameters
dstPropertyThe property to set
keyframeThe keyframe to set from

Reimplemented from inviwo::animation::BasePropertyTrack.

◆ updateKeyframeFromProperty()

template<typename Prop , typename Key >
void inviwo::animation::PropertyTrack< Prop, Key >::updateKeyframeFromProperty ( Property srcProperty,
Keyframe keyframe 
)
inlineoverridevirtual

Helper function to update the value if a keyframe from a property (other than the property owned by the track)

Called from inviwo::animation::KeyframeEditorWidget when the value of the keyframe is updated through the widget

Parameters
srcPropertyThe property to set from
keyframeThe keyframe to set

Reimplemented from inviwo::animation::BasePropertyTrack.


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