Kanzi 4.1.0
kanzi::TimelinePlaybackContext Class Referenceabstract

Use TimelinePlaybackContext helper interface class to defines the context of an animation playback. More...

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

Inheritance diagram for kanzi::TimelinePlaybackContext:
[legend]

Classes

struct  RuntimeEnvironment
 Defines a runtime environment for the animation playback. More...
 

Public Member Functions

const optional< RuntimeEnvironment > & getRuntimeEnvironment () const
 Returns the runtime environment of the playback context, if set.
 
bool isRelativePlayback ()
 Returns the state of the playback.
 
virtual shared_ptr< ObjectlookupObject (string_view path)
 Looks up for an object from a node's path.
 
void setRelativePlayback (bool isRelative)
 Sets the state of the playback.
 
void setRuntimeEnvironment (RuntimeEnvironment environment)
 Sets the runtime environment for the playback context.
 
 TimelinePlaybackContext ()
 Constructor.
 
virtual ~TimelinePlaybackContext ()
 Destructor.
 

Protected Member Functions

virtual shared_ptr< ObjectlookupObjectOverride (string_view path)=0
 Implement this function in inherited class to lookup for an object from a node.
 

Detailed Description

Use TimelinePlaybackContext helper interface class to defines the context of an animation playback.

Kanzi resolves paths to animated nodes relative to the node where you attach an Animation Player. Refer to AnimationPlayer for more details.

By using a TimelinePlaybackContext object you can:

  • Define how to resolve objects for timelines.
  • Should playback be relative or absolute.

Constructor & Destructor Documentation

◆ TimelinePlaybackContext()

kanzi::TimelinePlaybackContext::TimelinePlaybackContext ( )
inlineexplicit

Constructor.

Sets the playback to be an absolute playback.

◆ ~TimelinePlaybackContext()

virtual kanzi::TimelinePlaybackContext::~TimelinePlaybackContext ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ lookupObject()

virtual shared_ptr< Object > kanzi::TimelinePlaybackContext::lookupObject ( string_view path)
inlinevirtual

Looks up for an object from a node's path.

Note that the resolved object may be another node or a resource within a node.

Parameters
pathRelative path to use for the lookup.
Returns
Pointer to the object, or empty if the object is not found.

◆ setRelativePlayback()

void kanzi::TimelinePlaybackContext::setRelativePlayback ( bool isRelative)
inline

Sets the state of the playback.

By setting a playback as relative it sets AnimationPlayer::RelativePlaybackProperty of the animation player. Refer to AnimationPlayer AnimationPlayer::RelativePlaybackProperty for more details.

Parameters
isRelativeSet to true if the playback is relative, false otherwise.

◆ isRelativePlayback()

bool kanzi::TimelinePlaybackContext::isRelativePlayback ( )
inline

Returns the state of the playback.

Returns
If the playback is relative, true, otherwise false.

◆ setRuntimeEnvironment()

void kanzi::TimelinePlaybackContext::setRuntimeEnvironment ( RuntimeEnvironment environment)
inline

Sets the runtime environment for the playback context.

Playbacks created from this context observe properties on the source object to control their runtime state.

Parameters
environmentRuntime environment to set.
Since
Kanzi 4.1

◆ getRuntimeEnvironment()

const optional< RuntimeEnvironment > & kanzi::TimelinePlaybackContext::getRuntimeEnvironment ( ) const
inline

Returns the runtime environment of the playback context, if set.

Returns
Runtime environment, or empty optional if not set.
Since
Kanzi 4.1

◆ lookupObjectOverride()

virtual shared_ptr< Object > kanzi::TimelinePlaybackContext::lookupObjectOverride ( string_view path)
protectedpure virtual

Implement this function in inherited class to lookup for an object from a node.

Parameters
pathRelative path to use for lookup.
Returns
Pointer to the object, or empty if the object is not found.

Implemented in kanzi::ObjectTimelinePlaybackContext, and kanzi::SceneGraphTimelinePlaybackContext.


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