Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::animation::PropertyTrack< Prop, Key, Seq > Class Template Reference

#include <propertytrack.h>

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

Public Member Functions

 PropertyTrack (ProcessorNetwork *network)
 
 PropertyTrack (Prop *property)
 
 PropertyTrack (Prop *property, ProcessorNetwork *network)
 
virtual ~PropertyTrack ()
 
virtual PropertyTrackclone () const override
 
virtual std::string_view 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 void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
virtual Key * addKeyFrameUsingPropertyValue (const Property *property, Seconds time, std::unique_ptr< Interpolation > interpolation=nullptr) override
 
virtual Key * addKeyFrameUsingPropertyValue (Seconds time, std::unique_ptr< Interpolation > interpolation=nullptr) override
 
virtual Seq * addSequenceUsingPropertyValue (Seconds time, std::unique_ptr< Interpolation > interpolation=nullptr) override
 
virtual TracktoTrack () override
 
void setPropertyFromKeyframe (Property *dstProperty, const Keyframe *keyframe) const override
 Helper function to set a property from a keyframe.
 
void setKeyframeFromProperty (const 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)
 
virtual std::unique_ptr< Key > createKeyframe (Seconds time) const override
 
- Public Member Functions inherited from inviwo::animation::BaseTrack< Seq >
 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::optional< Seconds > getPrevTime (Seconds at) const final
 
virtual std::optional< Seconds > getNextTime (Seconds at) const final
 
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
 
- Public Member Functions inherited from inviwo::animation::Track
virtual ~Track ()=default
 
- 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 ()
 
- Public Member Functions inherited from inviwo::animation::BasePropertyTrack

Static Public Member Functions

static constexpr std::string_view classIdentifier ()
 

Protected Member Functions

 PropertyTrack (const PropertyTrack &other)=default
 
 PropertyTrack (PropertyTrack &&other)=default
 
std::unique_ptr< Key > createKeyframe (const Prop *property, Seconds time) const
 
std::unique_ptr< Seq > createKeyframeSequence (std::vector< std::unique_ptr< Key > > keys, std::unique_ptr< Interpolation > interpolation) const
 
- Protected Member Functions inherited from inviwo::animation::BaseTrack< Seq >
 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

- Public Types inherited from inviwo::animation::BaseTrack< Seq >
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
 
- Protected Attributes inherited from inviwo::Observer
std::unordered_set< ObservableInterface * > observables_
 

Detailed Description

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

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

See also
Track
KeyframeSequenceTyped
Property

Constructor & Destructor Documentation

◆ ~PropertyTrack()

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

Remove all keyframe sequences and call TrackObserver::notifyKeyframeSequenceRemoved

Member Function Documentation

◆ addKeyFrameUsingPropertyValue() [1/2]

template<typename Prop , typename Key , typename Seq >
Key * inviwo::animation::PropertyTrack< Prop, Key, Seq >::addKeyFrameUsingPropertyValue ( const Property * property,
Seconds time,
std::unique_ptr< Interpolation > interpolation = nullptr )
overridevirtual

◆ addKeyFrameUsingPropertyValue() [2/2]

template<typename Prop , typename Key , typename Seq >
Key * inviwo::animation::PropertyTrack< Prop, Key, Seq >::addKeyFrameUsingPropertyValue ( Seconds time,
std::unique_ptr< Interpolation > interpolation = nullptr )
overridevirtual

◆ addSequenceUsingPropertyValue()

template<typename Prop , typename Key , typename Seq >
Seq * inviwo::animation::PropertyTrack< Prop, Key, Seq >::addSequenceUsingPropertyValue ( Seconds time,
std::unique_ptr< Interpolation > interpolation = nullptr )
overridevirtual

◆ clone()

template<typename Prop , typename Key , typename Seq >
PropertyTrack< Prop, Key, Seq > * inviwo::animation::PropertyTrack< Prop, Key, Seq >::clone ( ) const
overridevirtual

Create a deep copy of the Track including references to its possibly underlying Property.

Implements inviwo::animation::Track.

◆ createKeyframe()

template<typename Prop , typename Key , typename Seq >
std::unique_ptr< Key > inviwo::animation::PropertyTrack< Prop, Key, Seq >::createKeyframe ( Seconds time) const
inlineoverridevirtual

◆ deserialize()

template<typename Prop , typename Key , typename Seq >
void inviwo::animation::PropertyTrack< Prop, Key, Seq >::deserialize ( Deserializer & d)
overridevirtual

◆ getClassIdentifier()

template<typename Prop , typename Key , typename Seq >
std::string_view inviwo::animation::PropertyTrack< Prop, Key, Seq >::getClassIdentifier ( ) const
overridevirtual

◆ getProperty() [1/2]

template<typename Prop , typename Key , typename Seq >
const Prop * inviwo::animation::PropertyTrack< Prop, Key, Seq >::getProperty ( ) const
overridevirtual

◆ getProperty() [2/2]

template<typename Prop , typename Key , typename Seq >
Prop * inviwo::animation::PropertyTrack< Prop, Key, Seq >::getProperty ( )
overridevirtual

◆ operator()()

template<typename Prop , typename Key , typename Seq >
AnimationTimeState inviwo::animation::PropertyTrack< Prop, Key, Seq >::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.

◆ serialize()

template<typename Prop , typename Key , typename Seq >
void inviwo::animation::PropertyTrack< Prop, Key, Seq >::serialize ( Serializer & s) const
overridevirtual

◆ setKeyframeFromProperty()

template<typename Prop , typename Key , typename Seq = KeyframeSequenceTyped<Key>>
void inviwo::animation::PropertyTrack< Prop, Key, Seq >::setKeyframeFromProperty ( const 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

Implements inviwo::animation::BasePropertyTrack.

◆ setProperty()

template<typename Prop , typename Key , typename Seq >
void inviwo::animation::PropertyTrack< Prop, Key, Seq >::setProperty ( Property * property)
overridevirtual

◆ setPropertyFromKeyframe()

template<typename Prop , typename Key , typename Seq = KeyframeSequenceTyped<Key>>
void inviwo::animation::PropertyTrack< Prop, Key, Seq >::setPropertyFromKeyframe ( Property * dstProperty,
const Keyframe * keyframe ) const
inlineoverridevirtual

Helper function to set a property from a keyframe.

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

Parameters
dstPropertyThe property to set
keyframeThe keyframe to set from

Implements inviwo::animation::BasePropertyTrack.

◆ toTrack()

template<typename Prop , typename Key , typename Seq >
Track * inviwo::animation::PropertyTrack< Prop, Key, Seq >::toTrack ( )
overridevirtual

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