1#ifndef _MOTION_CLIP_PLAYER_H
2#define _MOTION_CLIP_PLAYER_H
4#include <animation/skeleton.h>
15 void Init(gef::SkeletonPose
const & bind_pose);
20 bool Update(
float delta_time, gef::SkeletonPose
const & bind_pose);
22 [[nodiscard]]
float const anim_time()
const {
return anim_time_; }
23 void set_anim_time(
float const anim_time) { anim_time_ = anim_time; }
25 [[nodiscard]]
float const playback_speed()
const {
return playback_speed_; }
26 void set_playback_speed(
float const playback_speed) { playback_speed_ = playback_speed; }
28 [[nodiscard]]
bool const looping()
const {
return looping_; }
29 void set_looping(
bool const looping) { looping_ = looping; }
31 [[nodiscard]] gef::Animation
const * clip()
const {
return clip_; }
32 void set_clip(gef::Animation
const * clip) { clip_ = clip; }
34 [[nodiscard]] gef::SkeletonPose
const & pose()
const {
return pose_; }
38 gef::SkeletonPose pose_;
41 gef::Animation
const * clip_;
47 float playback_speed_;
Definition: motion_clip_player.h:9
bool Update(float delta_time, gef::SkeletonPose const &bind_pose)
Update the pose by sampling current animation clip.
Definition: motion_clip_player.cpp:18
void Init(gef::SkeletonPose const &bind_pose)
Initialise the clip player with the bind pose.
Definition: motion_clip_player.cpp:13