Kanzi  3.9.5
Kanzi Engine API
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]

Public Member Functions

bool isRelativePlayback ()
 Returns the state of the playback. More...
 
virtual shared_ptr< ObjectlookupObject (string_view path)
 Looks up for an object from a node's path. More...
 
void setRelativePlayback (bool isRelative)
 Sets the state of the playback. More...
 
 TimelinePlaybackContext ()
 Constructor. More...
 
virtual ~TimelinePlaybackContext ()
 Destructor. More...
 

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. More...
 

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.

◆ 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::SceneGraphTimelinePlaybackContext.


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