#include "kzu_time_line_sequence.h"
#include <kanzi/object/object.hpp>
#include <user/common/kzu_user.h>
#include <core/util/collection/kzc_dynamic_array.h>
#include <system/kzs_types.h>
#include <system/debug/kzs_error.h>
Namespaces | |
kanzi | |
Macros | |
#define | KZU_ANIMATION_PLAYER_PROFILING_SAMPLE_COMPOSE_REGULAR |
Profiling constant string for regular animation samples. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_SAMPLE_COMPOSE_BLEND |
Profiling constant string for blended animation samples. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_UPDATE |
Profiling constant string for updating whole animation player. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_UPDATE_ENTRIES |
Profiling constant string for updating entries. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_SORT_ENTRIES |
Profiling constant string for sorting entries. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_GRAPH_CACHE |
Profiling constant string for building graph cache. More... | |
#define | KZU_ANIMATION_PLAYER_PROFILING_IS_INVALIDATED |
Profiling constant string for player invalidation. More... | |
Functions | |
KANZI_API kzsError | kzuAnimationPlayerCreate (kanzi::Domain *domain, kanzi::Node *attachedObjectNode, struct KzuAnimationPlayer **out_animationPlayer) |
Allocates memory for animation player and initializes it. More... | |
KANZI_API kzsError | kzuAnimationPlayerDelete (struct KzuAnimationPlayer *animationPlayer) |
Deallocates memory reserved for animation player. More... | |
KANZI_API kanzi::Domain * | kzuAnimationPlayerGetUIDomain (const struct KzuAnimationPlayer *player) |
Gets UI domain associated to animation player. More... | |
KANZI_API kzsError | kzuAnimationPlayerUpdate (struct KzuAnimationPlayer *player, kzFloat deltaTime) |
Updates animations in player. More... | |
KANZI_API void | kzuAnimationPlayerSetTime (struct KzuAnimationPlayer *player, kzFloat time) |
Sets the animation player to the given time. More... | |
KANZI_API void | kzuAnimationPlayerSetPaused (struct KzuAnimationPlayer *player, kzBool paused) |
Sets pause state of the animation player. More... | |
KANZI_API kzBool | kzuAnimationPlayerIsPaused (const struct KzuAnimationPlayer *player) |
Check whether or not the animation player is paused. More... | |
KANZI_API void | kzuAnimationPlayerSetPausingEnabled (struct KzuAnimationPlayer *player, kzBool pausingEnabled) |
Sets pausing enabled for player. More... | |
KANZI_API kzFloat | kzuAnimationPlayerGetTime (const struct KzuAnimationPlayer *player) |
Returns current time of the animation player. More... | |
KANZI_API void | kzuAnimationPlayerSetEnabled (struct KzuAnimationPlayer *player, kzBool enabled) |
Sets animation player enabled, so that all its animations will be effectively executed and child players will be evaluated. More... | |
KANZI_API kzBool | kzuAnimationPlayerIsEnabled (const struct KzuAnimationPlayer *player) |
Returns if animation player is enabled. More... | |
KANZI_API kzsError | kzuAnimationPlayerAddTimeLineEntry (struct KzuAnimationPlayer *player, struct KzuTimeLineEntry *timeLineEntry) |
Adds new time line entry to the player. More... | |
KANZI_API kzsError | kzuAnimationPlayerRemoveTimeLineEntry (struct KzuAnimationPlayer *player, struct KzuTimeLineEntry *timeLineEntry, kzBool removeRecursively) |
Removes time line entry from the player if entry is found. More... | |
KANZI_API void | kzuAnimationPlayerSetTimeLineSequence (KzuAnimationPlayer *player, kanzi::TimeLineSequenceSharedPtr timeLineSequence) |
Sets a time line sequence to the player. More... | |
KANZI_API struct KzuTimeLineSequence * | kzuAnimationPlayerGetTimeLineSequence (const struct KzuAnimationPlayer *player) |
Returns time line sequence from the player. More... | |
KANZI_API kanzi::TimeLineEntrySharedPtr | kzuAnimationPlayerAddAnimationItem (struct KzuAnimationPlayer *player, kanzi::AnimationItemSharedPtr animationItem, kzBool reverse, kzInt repeatCount) |
Adds animation clip to player's current time. More... | |
KANZI_API kzsError | kzuAnimationPlayerFindAnimationItem (struct KzuAnimationPlayer *player, const struct KzuAnimationItem *animationItem, struct KzuAnimationPlayer **out_animationPlayer, struct KzuTimeLineEntry **out_timeLineEntry) |
Finds animation item from player, returns the first found hit. More... | |
KANZI_API kzBool | kzuAnimationPlayerGetTimeLineEntryFinished (const struct KzuAnimationPlayer *player, const struct KzuTimeLineEntry *timeLineEntry) |
Returns boolean indicating if given time line entry is finished on the animation players time line. More... | |
KANZI_API kzsError | kzuAnimationPlayerAddChildPlayer (struct KzuAnimationPlayer *parentPlayer, struct KzuAnimationPlayer *childPlayer) |
Adds child animation player for parent animation player. More... | |
KANZI_API kzsError | kzuAnimationPlayerRemoveFromParent (struct KzuAnimationPlayer *player) |
Removes child player from parent. More... | |
KANZI_API void | kzuAnimationPlayerRemoveFromChildren (struct KzuAnimationPlayer *player) |
Removes player from all its child players. More... | |
KANZI_API struct KzcDynamicArrayIterator | kzuAnimationPlayerGetChildPlayers (const struct KzuAnimationPlayer *player) |
Gets child animation players from player. More... | |
KANZI_API struct KzuAnimationPlayer * | kzuAnimationPlayerGetParentPlayer (const struct KzuAnimationPlayer *player) |
Returns the parent player. More... | |
KANZI_API struct KzuAnimationPlayer * | kzuAnimationPlayerGetRootPlayer (struct KzuAnimationPlayer *player) |
Gets root player from animation player. More... | |
KANZI_API void | kzuAnimationPlayerInvalidateEntryGraph (struct KzuAnimationPlayer *player) |
Invalidates cached entry graph of the animation player. More... | |
KANZI_API kzsError | kzuAnimationPlayerClearTimeLineEntries (struct KzuAnimationPlayer *player, kzBool clearChildren) |
Clears timeline entries from the animation player. More... | |
KANZI_API void | kzuAnimationPlayerRefreshPropertyDrivenAnimations (const struct KzuAnimationPlayer *player) |
Refresh all property driven animations recursively. More... | |
KANZI_API kanzi::Node * | kzuAnimationPlayerGetAttachedObjectNode (const struct KzuAnimationPlayer *player) |
Private function for getting attached object node from animation player. More... | |
KANZI_API struct KzuMessageDispatcher * | kzuAnimationPlayerGetMessageDispatcher (const struct KzuAnimationPlayer *player) |
Gets message dispatcher from animation player. More... | |
KANZI_API struct KzcMemoryManager * | kzuAnimationPlayerGetQuickMemoryManager (struct KzuAnimationPlayer *player) |
Returns quick memory manager from animation player. More... | |
#define KZU_ANIMATION_PLAYER_PROFILING_SAMPLE_COMPOSE_REGULAR |
Profiling constant string for regular animation samples.
#define KZU_ANIMATION_PLAYER_PROFILING_SAMPLE_COMPOSE_BLEND |
Profiling constant string for blended animation samples.
#define KZU_ANIMATION_PLAYER_PROFILING_UPDATE |
Profiling constant string for updating whole animation player.
#define KZU_ANIMATION_PLAYER_PROFILING_UPDATE_ENTRIES |
Profiling constant string for updating entries.
#define KZU_ANIMATION_PLAYER_PROFILING_SORT_ENTRIES |
Profiling constant string for sorting entries.
#define KZU_ANIMATION_PLAYER_PROFILING_GRAPH_CACHE |
Profiling constant string for building graph cache.
#define KZU_ANIMATION_PLAYER_PROFILING_IS_INVALIDATED |
Profiling constant string for player invalidation.
KANZI_API kzsError kzuAnimationPlayerCreate | ( | kanzi::Domain * | domain, |
kanzi::Node * | attachedObjectNode, | ||
struct KzuAnimationPlayer ** | out_animationPlayer | ||
) |
Allocates memory for animation player and initializes it.
domain | The UI domain to use. |
attachedObjectNode | Object node that owns the animation player. KZ_NULL if none, in this case message dispatching is not supported. |
out_animationPlayer | A pointer that is set to point to the new animation player on success. |
KANZI_API kzsError kzuAnimationPlayerDelete | ( | struct KzuAnimationPlayer * | animationPlayer | ) |
Deallocates memory reserved for animation player.
KANZI_API kanzi::Domain* kzuAnimationPlayerGetUIDomain | ( | const struct KzuAnimationPlayer * | player | ) |
Gets UI domain associated to animation player.
KANZI_API kzsError kzuAnimationPlayerUpdate | ( | struct KzuAnimationPlayer * | player, |
kzFloat | deltaTime | ||
) |
Updates animations in player.
player | The animation player. |
deltaTime | Seconds elapsed since the last update. |
KANZI_API void kzuAnimationPlayerSetTime | ( | struct KzuAnimationPlayer * | player, |
kzFloat | time | ||
) |
Sets the animation player to the given time.
player | The animation player. |
time | The time in seconds. |
KANZI_API void kzuAnimationPlayerSetPaused | ( | struct KzuAnimationPlayer * | player, |
kzBool | paused | ||
) |
Sets pause state of the animation player.
KANZI_API kzBool kzuAnimationPlayerIsPaused | ( | const struct KzuAnimationPlayer * | player | ) |
KANZI_API void kzuAnimationPlayerSetPausingEnabled | ( | struct KzuAnimationPlayer * | player, |
kzBool | pausingEnabled | ||
) |
Sets pausing enabled for player.
Disabling pausing can be useful for players that are not wanted to be paused when main player pauses, such as preview camera animations.
KANZI_API kzFloat kzuAnimationPlayerGetTime | ( | const struct KzuAnimationPlayer * | player | ) |
Returns current time of the animation player.
KANZI_API void kzuAnimationPlayerSetEnabled | ( | struct KzuAnimationPlayer * | player, |
kzBool | enabled | ||
) |
Sets animation player enabled, so that all its animations will be effectively executed and child players will be evaluated.
KANZI_API kzBool kzuAnimationPlayerIsEnabled | ( | const struct KzuAnimationPlayer * | player | ) |
Returns if animation player is enabled.
KANZI_API kzsError kzuAnimationPlayerAddTimeLineEntry | ( | struct KzuAnimationPlayer * | player, |
struct KzuTimeLineEntry * | timeLineEntry | ||
) |
Adds new time line entry to the player.
KANZI_API kzsError kzuAnimationPlayerRemoveTimeLineEntry | ( | struct KzuAnimationPlayer * | player, |
struct KzuTimeLineEntry * | timeLineEntry, | ||
kzBool | removeRecursively | ||
) |
Removes time line entry from the player if entry is found.
removeRecursively | Removes and inspects entry also child players. |
KANZI_API void kzuAnimationPlayerSetTimeLineSequence | ( | KzuAnimationPlayer * | player, |
kanzi::TimeLineSequenceSharedPtr | timeLineSequence | ||
) |
Sets a time line sequence to the player.
KANZI_API struct KzuTimeLineSequence* kzuAnimationPlayerGetTimeLineSequence | ( | const struct KzuAnimationPlayer * | player | ) |
Returns time line sequence from the player.
KANZI_API kanzi::TimeLineEntrySharedPtr kzuAnimationPlayerAddAnimationItem | ( | struct KzuAnimationPlayer * | player, |
kanzi::AnimationItemSharedPtr | animationItem, | ||
kzBool | reverse, | ||
kzInt | repeatCount | ||
) |
Adds animation clip to player's current time.
KANZI_API kzsError kzuAnimationPlayerFindAnimationItem | ( | struct KzuAnimationPlayer * | player, |
const struct KzuAnimationItem * | animationItem, | ||
struct KzuAnimationPlayer ** | out_animationPlayer, | ||
struct KzuTimeLineEntry ** | out_timeLineEntry | ||
) |
Finds animation item from player, returns the first found hit.
KANZI_API kzBool kzuAnimationPlayerGetTimeLineEntryFinished | ( | const struct KzuAnimationPlayer * | player, |
const struct KzuTimeLineEntry * | timeLineEntry | ||
) |
Returns boolean indicating if given time line entry is finished on the animation players time line.
KANZI_API kzsError kzuAnimationPlayerAddChildPlayer | ( | struct KzuAnimationPlayer * | parentPlayer, |
struct KzuAnimationPlayer * | childPlayer | ||
) |
Adds child animation player for parent animation player.
KANZI_API kzsError kzuAnimationPlayerRemoveFromParent | ( | struct KzuAnimationPlayer * | player | ) |
Removes child player from parent.
KANZI_API void kzuAnimationPlayerRemoveFromChildren | ( | struct KzuAnimationPlayer * | player | ) |
Removes player from all its child players.
KANZI_API struct KzcDynamicArrayIterator kzuAnimationPlayerGetChildPlayers | ( | const struct KzuAnimationPlayer * | player | ) |
Gets child animation players from player.
KANZI_API struct KzuAnimationPlayer* kzuAnimationPlayerGetParentPlayer | ( | const struct KzuAnimationPlayer * | player | ) |
Returns the parent player.
KZ_NULL if no parent.
KANZI_API struct KzuAnimationPlayer* kzuAnimationPlayerGetRootPlayer | ( | struct KzuAnimationPlayer * | player | ) |
Gets root player from animation player.
Returns self if this is the root.
KANZI_API void kzuAnimationPlayerInvalidateEntryGraph | ( | struct KzuAnimationPlayer * | player | ) |
Invalidates cached entry graph of the animation player.
KANZI_API kzsError kzuAnimationPlayerClearTimeLineEntries | ( | struct KzuAnimationPlayer * | player, |
kzBool | clearChildren | ||
) |
Clears timeline entries from the animation player.
clearChildren | are the children cleared recursively. |
KANZI_API void kzuAnimationPlayerRefreshPropertyDrivenAnimations | ( | const struct KzuAnimationPlayer * | player | ) |
Refresh all property driven animations recursively.
KANZI_API kanzi::Node* kzuAnimationPlayerGetAttachedObjectNode | ( | const struct KzuAnimationPlayer * | player | ) |
Private function for getting attached object node from animation player.
KANZI_API struct KzuMessageDispatcher* kzuAnimationPlayerGetMessageDispatcher | ( | const struct KzuAnimationPlayer * | player | ) |
Gets message dispatcher from animation player.
KANZI_API struct KzcMemoryManager* kzuAnimationPlayerGetQuickMemoryManager | ( | struct KzuAnimationPlayer * | player | ) |
Returns quick memory manager from animation player.