kanzi::AnimationPlayer Class Reference

Animation player is useful to perform playback of animation timeline. More...

#include <kanzi/core.ui/animation/animation_player.hpp>

Inheritance diagram for kanzi::AnimationPlayer:
kanzi::NodeComponent kanzi::Object kanzi::MetaObject kanzi::PropertyObject

Classes

class  CompletedMessageArguments
 Message arguments for Completed message. More...
 
class  PauseMessageArguments
 Message arguments for Pause message. More...
 
class  PlayMessageArguments
 Message arguments for Play message. More...
 
class  ResumeMessageArguments
 Message arguments for Resume message. More...
 
class  StartedMessageArguments
 Message arguments for Started message. More...
 
class  StopMessageArguments
 Message arguments for Stop message. More...
 
class  StoppedMessageArguments
 Message arguments for Stopped message. More...
 

Public Member Functions

void setTimeline (TimelineSharedPtr animationTimeline)
 
TimelineSharedPtr getTimeline () const
 
TimelinePlaybackSharedPtr getTimelinePlayback () const
 Gets timeline playback that has been made for the timeline. More...
 
void setAutoplayEnabled (bool enabled)
 
bool isAutoplayEnabled () const
 
void setRelativePlayback (bool relativePlayback)
 Sets value of RelativePlayback property. More...
 
bool isRelativePlayback () const
 Gets value of RelativePlayback property. More...
 
void setRestoreOriginalValuesAfterPlayback (bool restore)
 Sets values of RestoreOriginalValuesAfterPlayback property. More...
 
bool isRestoreOriginalValuesAfterPlayback () const
 Gets values of RestoreOriginalValuesAfterPlayback property. More...
 
void setPlaybackMode (Timeline::DirectionBehavior mode)
 Sets value of PlaybackMode property. More...
 
Timeline::DirectionBehavior getPlaybackMode () const
 Gets value of PlaybackMode property. More...
 
void setDurationScale (float durationScale)
 Sets value of DurationScale property. More...
 
float getDurationScale () const
 Gets value of DurationScale property. More...
 
void setRepeatCount (int repeatCount)
 Sets value of RepeatCount property. More...
 
int getRepeatCount () const
 Gets value of RepeatCount property. More...
 
void start (Timeline::DirectionBehavior direction, float durationScale, unsigned int repeatCount)
 Starts new playback from any player's state. More...
 
void resume ()
 Resumes playback if player is paused or started new one if player is stopped. More...
 
void pause ()
 Pauses currently ongoing playback. If playback has been already paused or. More...
 
void stop ()
 Stops currently ongoing or paused playback. More...
 
- Public Member Functions inherited from kanzi::NodeComponent
virtual ~NodeComponent ()
 Destructor. More...
 
void setName (string_view name)
 Sets the name of node component. More...
 
string getName () const
 Gets the name of node component. More...
 
NodeSharedPtr getNode () const
 Returns the node the node component is attached to or null pointer if node component is not attached to a node. More...
 
void attach (NodeWeakPtr node)
 Attaches node component to node. More...
 
void detach ()
 Detaches node component from the node it was attached to. More...
 
State getState () const
 Gets the state of node component indicating if component is attached to a node, detached from any node or in process of attaching/detaching. More...
 
bool isAttaching () const
 Indicates whether node component is in the process of attaching to a node. More...
 
bool isAttached () const
 Indicates whether node component is attached to a node. More...
 
bool isAttachingOrAttached () const
 Indicates whether node component is in the process of attaching to a node or already attached. More...
 
bool isDetaching () const
 Indicates whether node component currently detaching from the node. More...
 
bool isDetached () const
 Indicates whether node component is detached from any node. More...
 
bool isDetachingOrDetached () const
 Indicates whether node component is in the process of detaching from the node or already detached. More...
 
- Public Member Functions inherited from kanzi::Object
 Object (Domain *domain)
 
virtual ~Object ()
 
DomaingetDomain () const
 Returns the domain the object belongs to. More...
 
KzuTaskSchedulergetTaskScheduler () const
 Returns the task scheduler of the object. More...
 
KzuMessageDispatchergetMessageDispatcher () const
 Returns the message dispatcher of the object. More...
 
ResourceManagergetResourceManager () const
 Returns the resource manager of the object. More...
 
virtual const MetaclassgetDynamicMetaclass () const KZ_OVERRIDE
 Returns the metaclass of the dynamic type of the object. More...
 
AppliedStyleEntryapplyObjectStyle (kanzi::StyleSharedPtr style)
 Applies a style to an object. More...
 
void unapplyObjectStyle (AppliedStyleEntry *appliedStyleEntry)
 
void applyObjectStyles ()
 Apply all styles for an object node. More...
 
void unapplyObjectStyles ()
 Unapplies and removes all applied styles. More...
 
- Public Member Functions inherited from kanzi::MetaObject
virtual ~MetaObject ()
 
bool isTypeOf (const Metaclass *objectType) const
 Determines if the type of this object is the given type or derived from it. More...
 
- Public Member Functions inherited from kanzi::PropertyObject
 PropertyObject ()
 
virtual ~PropertyObject ()
 
template<typename DataType >
void setProperty (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 Sets the local value of a property. More...
 
void removeKzbProperties ()
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getProperty (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property. More...
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalProperty (const PropertyType< DataType > &propertyType) const
 Evaluates the property value in the same way as the overload above but does not default to the value in property metadata if there are no inputs to the property value. More...
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getPropertyBase (const PropertyType< DataType > &propertyType) const
 Returns the current value of a property disregarding modifiers. More...
 
template<typename DataType >
void setAbstractProperty (AbstractPropertyType abstractPropertyType, typename PropertyType< DataType >::Traits::ParameterType value)
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
PropertyType< DataType >::Traits::ReturnType getAbstractPropertyBase (AbstractPropertyType abstractPropertyType) const
 
template<typename DataType >
optional< typename PropertyType< DataType >::Traits::ReturnType > getOptionalAbstractProperty (AbstractPropertyType abstractPropertyType) const
 
void setPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
bool isPropertyFlagSet (AbstractPropertyType propertyType, uint32_t flag) const
 
void clearPropertyFlag (AbstractPropertyType propertyType, uint32_t flag)
 
bool hasValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value. More...
 
bool hasBaseValue (AbstractPropertyType propertyType) const
 Evaluates whether there are any inputs into the property value, disregarding modifiers. More...
 
bool hasLocalValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a local value set for the property. More...
 
bool hasNonClassValue (AbstractPropertyType propertyType) const
 Evaluates whether there is a value of any precedence higher than class default value set for the property. More...
 
void removeLocalValue (AbstractPropertyType propertyType)
 Removes the local value associated with the property. More...
 
void copyLocalValue (const PropertyObject &other, AbstractPropertyType propertyType)
 Copies local value of single property from another object. More...
 
void copyLocalValues (const PropertyObject &other)
 Copies all local values from another object. More...
 
virtual void onPropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason)
 Virtual function to handle property change notifications. More...
 
template<typename DataType >
void addPropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, PropertyValuePrecedence precedence, void *owner)
 
template<typename DataType >
void removePropertyValueSource (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::TypedValueSource *valueSource, void *owner)
 
template<typename DataType >
void addPropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
template<typename DataType >
void removePropertyModifier (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::ModifierCallback callback, void *owner)
 
void validatePropertyModifiers (AbstractPropertyType propertyType)
 
template<typename DataType >
void addPropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
void removePropertyNotificationHandler (const PropertyType< DataType > &propertyType, typename PropertyType< DataType >::Descriptor::NotificationCallback callback, void *owner)
 
template<typename DataType >
size_t getPropertyNotificationHandlerCount (const PropertyType< DataType > &propertyType)
 Gets number of current notification handlers for given property type. More...
 

Static Public Member Functions

static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static AnimationPlayerSharedPtr create (Domain *domain, string_view name)
 Creates animation player. More...
 
- Static Public Member Functions inherited from kanzi::NodeComponent
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::Object
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 
- Static Public Member Functions inherited from kanzi::MetaObject
static const MetaclassgetStaticMetaclass ()
 Returns the metaclass of Object class. More...
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 Default implementation that returns empty editor info. More...
 

Static Public Attributes

static PropertyType< ResourceSharedPtrTimelineProperty
 Timeline property specifies animation timeline which is played by animation player after it is attached. More...
 
static PropertyType< bool > AutoplayEnabledProperty
 AutoplayEnabled property specifies whether animation player automatically starts playback of its timeline when it is attached to its node. More...
 
static PropertyType< bool > RelativePlaybackProperty
 RelativePlayback property specifies whether animations are played in relative manner by adding animated value to target property value instead of replacing the property value. More...
 
static PropertyType< bool > RestoreOriginalValuesAfterPlaybackProperty
 RestoreOriginalValuesAfterPlayback property specifies whether animated properties return to their initial values after playback of the timeline ends. More...
 
static PropertyType< KzuTimeLineEntryPlaybackModePlaybackModeProperty
 PlaybackMode property specifies the mode of timeline playback (normal, reverse, pingpong). More...
 
static PropertyType< float > DurationScaleProperty
 DurationScale property specifies how much duration of the timeline is scaled during its playback. More...
 
static PropertyType< int > RepeatCountProperty
 RepeatCount property specifies how many times the timeline is played during its playback. More...
 
static MessageType< PlayMessageArgumentsPlayMessage
 Play message. More...
 
static MessageType< ResumeMessageArgumentsResumeMessage
 Resume message. More...
 
static MessageType< PauseMessageArgumentsPauseMessage
 Pause message. More...
 
static MessageType< StopMessageArgumentsStopMessage
 Stop message. More...
 
static MessageType< StartedMessageArgumentsStartedMessage
 Started message. More...
 
static MessageType< StoppedMessageArgumentsStoppedMessage
 Stopped message. More...
 
static MessageType< CompletedMessageArgumentsCompletedMessage
 Completed message. More...
 
- Static Public Attributes inherited from kanzi::NodeComponent
static PropertyType< string > NameProperty
 Name property specifies the name of node component. More...
 

Protected Member Functions

 AnimationPlayer (Domain *domain, string_view name)
 Constructor. More...
 
virtual void attachOverride () KZ_OVERRIDE
 NodeComponent::attachOverride() implementation. More...
 
virtual void detachOverride () KZ_OVERRIDE
 NodeComponent::detachOverride() implementation. More...
 
void playMessageHandler (PlayMessageArguments &messageArguments)
 Message handler for Play message. More...
 
void resumeMessageHandler (ResumeMessageArguments &messageArguments)
 Message handler for Resume message. More...
 
void pauseMessageHandler (PauseMessageArguments &messageArguments)
 Message handler for Pause message. More...
 
void stopMessageHandler (StopMessageArguments &messageArguments)
 Message handler for Stop message. More...
 
void onPlaybackFinished (TimelinePlayback &timelinePlayback)
 Handler for finish timeline playback. More...
 
- Protected Member Functions inherited from kanzi::NodeComponent
 NodeComponent (Domain *domain, string_view name)
 Constructor. More...
 
template<typename TMessageType , typename TClass , typename TMethod >
Node::MessageSubscriptionToken addNodeComponentMessageHandler (TMessageType &messageType, TClass *nodeComponent, TMethod method)
 Adds message handler for node component messages to the component's node. More...
 
void removeNodeComponentMessageFilter (Node::MessageSubscriptionToken subscriptionToken)
 Removes message handler added via addNodeComponentMessageHandler function. More...
 
- Protected Member Functions inherited from kanzi::Object
void initialize ()
 
void onCopy (const Object &other)
 
- Protected Member Functions inherited from kanzi::MetaObject
 MetaObject ()
 
void initialize ()
 
- Protected Member Functions inherited from kanzi::PropertyObject
void addPropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, PropertyValuePrecedence precedence, void *owner)
 
void removePropertyValueSource (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::ValueSource *valueSource, void *owner)
 
AbstractPropertyTypeDescriptor::ValueSourceEntrygetTopValueSourceEntry (AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage) const
 
AbstractPropertyTypeDescriptor::ValueSourceEntrygetTopValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetTopValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetFinalValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetNonClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourcegetClassValueSource (AbstractPropertyTypeDescriptor &descriptor) const
 
AbstractPropertyTypeDescriptor::ValueSourceEntryfindLocalValueSourceEntry (AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::ValueSourceEntryconstructLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor, AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 
AbstractPropertyTypeDescriptor::ValueSourceEntryacquireLocalValueSourceEntry (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::PropertyStoragefindPropertyStorage (AbstractPropertyTypeDescriptor &descriptor) const
 
PropertyStoragePtr findPropertyStoragePtr (AbstractPropertyTypeDescriptor &descriptor) const
 Gets property storage intrusive pointer that can be used to hold a reference until end of operation. More...
 
PropertyStoragePtr constructPropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
PropertyStoragePtr acquirePropertyStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::ModifierStorageacquireModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::ModifierStoragefindModifierStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStorageacquireNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptor::NotificationStoragefindNotificationStorage (AbstractPropertyTypeDescriptor &descriptor)
 
AbstractPropertyTypeDescriptorfindPropertyTypeDescriptorByUnqualifiedNameAndDataType (string_view unqualifiedName, PropertyDataType dataType)
 
void validatePropertyModifiersAndNotifyHandlers (PropertyStoragePtr &propertyStorage)
 
void copyLocalValue (const AbstractPropertyTypeDescriptor::PropertyStorage &propertyStorage)
 Copy local value from property storage. More...
 
PropertyStorageContainer::iterator beginPropertyStorage ()
 
PropertyStorageContainer::iterator endPropertyStorage ()
 
virtual void notifyPropertyHandlers (PropertyStoragePtr &propertyStorage, PropertyNotificationReason reason)
 
void onCopy (const PropertyObject &other)
 

Additional Inherited Members

- Public Types inherited from kanzi::NodeComponent
enum  State { StateDetached, StateDetaching, StateAttaching, StateAttached }
 State indicating if component is attached to a node, detached from any node or in process of attaching/detaching. More...
 
- Public Types inherited from kanzi::PropertyObject
typedef intrusive_ptr< AbstractPropertyTypeDescriptor::PropertyStoragePropertyStoragePtr
 
typedef vector< PropertyStoragePtrPropertyStorageContainer
 
typedef PropertyStorageContainer::iterator PropertyStorageIterator
 
typedef PropertyStorageContainer::const_iterator PropertyStorageConstIterator
 
typedef PropertyStorageContainer::reverse_iterator PropertyStorageReverseIterator
 
- Protected Types inherited from kanzi::Object
typedef vector< AppliedStyleEntry * > AppliedStyleContainer
 Applied style container. More...
 
- Static Protected Member Functions inherited from kanzi::NodeComponent
template<typename TMessageType , typename TClass , typename TMethod >
static void nodeComponentMessageHandler (TClass *nodeComponent, TMethod method, typename TMessageType::ArgumentsType &messageArguments)
 Handler function for node component messages. More...
 
- Protected Attributes inherited from kanzi::Object
AppliedStyleContainer m_appliedStyles
 Listing of applied styles applied to this object. More...
 

Detailed Description

Animation player is useful to perform playback of animation timeline.

Animation player performs playback of timeline which is set to the Timeline property of the player. Paths to animated objects are resolved relative to the node where the player is attached to.

Playback of animation player can be controlled by sending Play, Pause, Resume and Stop messages to the node where animation player is attached. By default, animation player does not start playback until Play message is sent to the node. This behavior can be changed by modifying AutoplayEnabled property of AnimationPlayer. If this property is set to True, then AnimationPlayer starts playback right after it is attached to a node. Default value of AutoplayEnabled property is False.

When you start player's playback by sending Play or Resume messages to it (or if player has autoplay enabled), the player adds its timeline as a child to a parallel timeline and applies all playback settings from its Playback Mode, Duration Scale and Repeat Count properties to it. If you start playback by sending Play message with playback arguments, the player adds its parallel timeline as a child to yet another parallel timeline and applies playback settings from Play message arguments to it.

Examples

To create animation player and set timeline:

// Create animation player.
AnimationPlayerSharedPtr animationPlayer = AnimationPlayer::create(domain, "player");
// Set timeline.
animationPlayer->setTimeline(timeline);

To attach animation player to the node:

node->addNodeComponent(animationPlayer);

To start animation player:

// Start playback in animation player by sending PlayMessage
// to the node where animation player is attached.
AnimationPlayer::PlayMessageArguments playMessageArguments;
playMessageArguments.setPlaybackMode(Timeline::DirectionBehaviorReverse);
playMessageArguments.setDurationScale(2.0f);
playMessageArguments.setRepeatCount(2);
node->dispatchMessage(AnimationPlayer::PlayMessage, playMessageArguments);

To pause animation player:

// Pause playback in animation player by sending PauseMessage
// to the node where animation player is attached.
AnimationPlayer::PauseMessageArguments pauseMessageArguments;
node->dispatchMessage(AnimationPlayer::PauseMessage, pauseMessageArguments);

To resume animation player:

// Resume playback in animation player by sending ResumeMessage
// to the node where animation player is attached.
AnimationPlayer::ResumeMessageArguments resumeMessageArguments;
node->dispatchMessage(AnimationPlayer::ResumeMessage, resumeMessageArguments);

To stop animation player:

// Stop playback in animation player by sending StopMessage
// to the node where animation player is attached.
AnimationPlayer::StopMessageArguments stopMessageArguments;
node->dispatchMessage(AnimationPlayer::StopMessage, stopMessageArguments);

To detach animation player from the node:

node->removeNodeComponent(*animationPlayer);

Constructor & Destructor Documentation

kanzi::AnimationPlayer::AnimationPlayer ( Domain domain,
string_view  name 
)
explicitprotected

Constructor.

Parameters
domainDomain.
nameName of animation player.

Member Function Documentation

static PropertyTypeEditorInfoSharedPtr kanzi::AnimationPlayer::makeEditorInfo ( )
static
static AnimationPlayerSharedPtr kanzi::AnimationPlayer::create ( Domain domain,
string_view  name 
)
inlinestatic

Creates animation player.

Parameters
domainDomain.
nameName of animation player.
Returns
animation player.
void kanzi::AnimationPlayer::setTimeline ( TimelineSharedPtr  animationTimeline)
TimelineSharedPtr kanzi::AnimationPlayer::getTimeline ( ) const
TimelinePlaybackSharedPtr kanzi::AnimationPlayer::getTimelinePlayback ( ) const

Gets timeline playback that has been made for the timeline.

Returns
Timeline playback, may be null.
void kanzi::AnimationPlayer::setAutoplayEnabled ( bool  enabled)
bool kanzi::AnimationPlayer::isAutoplayEnabled ( ) const
void kanzi::AnimationPlayer::setRelativePlayback ( bool  relativePlayback)

Sets value of RelativePlayback property.

Parameters
relativePlaybackSpecifies whether playback is relative.
bool kanzi::AnimationPlayer::isRelativePlayback ( ) const

Gets value of RelativePlayback property.

Returns
True if playback is relative, false otherwise.
void kanzi::AnimationPlayer::setRestoreOriginalValuesAfterPlayback ( bool  restore)

Sets values of RestoreOriginalValuesAfterPlayback property.

Parameters
restoreSpecifies whether original values restored after playback finishes.
bool kanzi::AnimationPlayer::isRestoreOriginalValuesAfterPlayback ( ) const

Gets values of RestoreOriginalValuesAfterPlayback property.

Returns
True is original values are restored after playback finishes, false otherwise.
void kanzi::AnimationPlayer::setPlaybackMode ( Timeline::DirectionBehavior  mode)

Sets value of PlaybackMode property.

Parameters
modePlayback mode.
Timeline::DirectionBehavior kanzi::AnimationPlayer::getPlaybackMode ( ) const

Gets value of PlaybackMode property.

Returns
Playback mode.
void kanzi::AnimationPlayer::setDurationScale ( float  durationScale)

Sets value of DurationScale property.

Parameters
durationScaleDuration scale.
float kanzi::AnimationPlayer::getDurationScale ( ) const

Gets value of DurationScale property.

Returns
Duration scale.
void kanzi::AnimationPlayer::setRepeatCount ( int  repeatCount)

Sets value of RepeatCount property.

Parameters
repeatCountRepeat count.
int kanzi::AnimationPlayer::getRepeatCount ( ) const

Gets value of RepeatCount property.

Returns
Repeat count.
void kanzi::AnimationPlayer::start ( Timeline::DirectionBehavior  direction,
float  durationScale,
unsigned int  repeatCount 
)

Starts new playback from any player's state.

Parameters
directionDirection behavior which is applied on top of direction behavior property of the player.
durationScaleDuration scale which is applied on top of duration scale property of the player.
repeatCountRepeat count which is applied on top of repeat count property of the player.
void kanzi::AnimationPlayer::resume ( )

Resumes playback if player is paused or started new one if player is stopped.

void kanzi::AnimationPlayer::pause ( )

Pauses currently ongoing playback. If playback has been already paused or.

void kanzi::AnimationPlayer::stop ( )

Stops currently ongoing or paused playback.

resumePlayback() called afterwards will start new playback. If playback has already been stopped, nothing will happen.

virtual void kanzi::AnimationPlayer::attachOverride ( )
protectedvirtual

NodeComponent::attachOverride() implementation.

Reimplemented from kanzi::NodeComponent.

virtual void kanzi::AnimationPlayer::detachOverride ( )
protectedvirtual

NodeComponent::detachOverride() implementation.

Reimplemented from kanzi::NodeComponent.

void kanzi::AnimationPlayer::playMessageHandler ( PlayMessageArguments messageArguments)
protected

Message handler for Play message.

/param messageArguments Arguments of Play message.

void kanzi::AnimationPlayer::resumeMessageHandler ( ResumeMessageArguments messageArguments)
protected

Message handler for Resume message.

/param messageArguments Arguments of Resume message.

void kanzi::AnimationPlayer::pauseMessageHandler ( PauseMessageArguments messageArguments)
protected

Message handler for Pause message.

/param messageArguments Arguments of pause message.

void kanzi::AnimationPlayer::stopMessageHandler ( StopMessageArguments messageArguments)
protected

Message handler for Stop message.

/param messageArguments Arguments of Stop message.

void kanzi::AnimationPlayer::onPlaybackFinished ( TimelinePlayback timelinePlayback)
protected

Handler for finish timeline playback.

Parameters
timelinePlaybackFinished playback.

Member Data Documentation

PropertyType<ResourceSharedPtr> kanzi::AnimationPlayer::TimelineProperty
static

Timeline property specifies animation timeline which is played by animation player after it is attached.

PropertyType<bool> kanzi::AnimationPlayer::AutoplayEnabledProperty
static

AutoplayEnabled property specifies whether animation player automatically starts playback of its timeline when it is attached to its node.

By default autoplay is disabled.

PropertyType<bool> kanzi::AnimationPlayer::RelativePlaybackProperty
static

RelativePlayback property specifies whether animations are played in relative manner by adding animated value to target property value instead of replacing the property value.

By default relative playback is disabled.

PropertyType<bool> kanzi::AnimationPlayer::RestoreOriginalValuesAfterPlaybackProperty
static

RestoreOriginalValuesAfterPlayback property specifies whether animated properties return to their initial values after playback of the timeline ends.

By default restoring original values is disabled.

PropertyType<KzuTimeLineEntryPlaybackMode> kanzi::AnimationPlayer::PlaybackModeProperty
static

PlaybackMode property specifies the mode of timeline playback (normal, reverse, pingpong).

By default normal playback mode is set.

PropertyType<float> kanzi::AnimationPlayer::DurationScaleProperty
static

DurationScale property specifies how much duration of the timeline is scaled during its playback.

By default duration scale is set to 1.0 (no scale).

PropertyType<int> kanzi::AnimationPlayer::RepeatCountProperty
static

RepeatCount property specifies how many times the timeline is played during its playback.

By default repeat count is set to 1 (timeline is played once).

MessageType<PlayMessageArguments> kanzi::AnimationPlayer::PlayMessage
static

Play message.

When this message is sent to the node to which the animation player is attached, animation player will start playing animation specified as its Animation property. If there is currently ongoing playback, it will be stopped and new playback will be started.

MessageType<ResumeMessageArguments> kanzi::AnimationPlayer::ResumeMessage
static

Resume message.

When this message is sent to the node to which the animation player is attached, animation player will start playing animation specified as its Animation property. If there is currently ongoing playback, it will be resumed.

MessageType<PauseMessageArguments> kanzi::AnimationPlayer::PauseMessage
static

Pause message.

When this message is sent to the node to which the animation player is attached, animation player will pause current playback. If animation playback is paused of stopped, animation player will do nothing.

MessageType<StopMessageArguments> kanzi::AnimationPlayer::StopMessage
static

Stop message.

When this message is sent to the node to which the animation player is attached, animation player will stop playback. The next sent Play message will start playing animation from the beginning.

MessageType<StartedMessageArguments> kanzi::AnimationPlayer::StartedMessage
static

Started message.

Node of animation player sends Started message when animation player starts playback of its timeline. This message is not sent in case animation player resumes playback after it was paused. After this message is sent the timeline is actively applied to animate target properties.

MessageType<StoppedMessageArguments> kanzi::AnimationPlayer::StoppedMessage
static

Stopped message.

Node of animation player sends Stopped message when animation player stops playback of its timeline. After this message is sent the timeline is not applied to target properties.

MessageType<CompletedMessageArguments> kanzi::AnimationPlayer::CompletedMessage
static

Completed message.

Node of animation player sends Completed message when animation player completes playback of its timeline. After this message is sent the timeline is still applied to target properties.


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