2 #ifndef KJY_ANIM_ENGINE_COMPONENTS_SKELETON_ANIMATOR_HPP_ 3 #define KJY_ANIM_ENGINE_COMPONENTS_SKELETON_ANIMATOR_HPP_ 4 #include "KeyframeAnimation.hpp" 11 virtual Pose sample(
size_t index, key_time_t time)
const override;
12 virtual void sampleInPlace(
size_t index, key_time_t time,
Pose& target_prop)
const override;
13 virtual key_time_t getLength()
const override;
18 std::vector<PoseKeyframeSequence> bone_subanimations;
28 SkinKeyframeAnimator(
const std::string& name,
size_t bone_count) : _animation_name(name), sequence(name, bone_count) {}
30 virtual key_time_t getCurrentTime()
const override;
31 virtual void setCurrentTime(key_time_t time)
override;
32 virtual std::string getAnimatorName()
const override;
33 virtual void setAnimatorName(
const std::string& name)
override;
35 virtual bool isEnabled()
const override {
return(_enabled);}
36 virtual void enable()
override {_enabled =
true;}
37 virtual void disable()
override {_enabled =
false;}
39 virtual key_time_t getLength()
const override;
41 virtual bool willLoop()
const override {
return(_loops);}
42 virtual void enableLoop()
override {_loops =
true;};
43 virtual void disableLoop()
override {_loops =
false;}
45 virtual void overrideLoopTime(key_time_t time)
override {_loop_time = time;}
47 virtual void resetLoopTime()
override {_loop_time = 0;}
49 virtual Pose sample(
size_t bone_index)
const;
52 key_time_t _current_time;
53 std::string _animation_name;
57 key_time_t _loop_time = 0;
Definition: SkeletonAnimator.hpp:7
Definition: KeyframeAnimation.hpp:102
Definition: SkeletonAnimator.hpp:24
Definition: KeyframeAnimation.hpp:130