11#ifndef RAYANIMATIONSET_HPP_
12#define RAYANIMATIONSET_HPP_
30 _animations = raylib::LoadModelAnimations(path.c_str(), &_size);
35 raylib::UnloadModelAnimations(_animations, _size);
39 return _animations !=
nullptr;
46 std::string
getName(
int index)
const override {
47 return valid(index) ? _animations[index].name : std::string();
51 return valid(index) ? _animations[index].frameCount : 0;
54 raylib::ModelAnimation *
handle()
const {
59 bool valid(
int index)
const {
60 return _animations && index >= 0 && index < _size;
63 raylib::ModelAnimation *_animations;
raylib::ModelAnimation * handle() const
Definition RayAnimationSet.hpp:54
bool isReady() const override
notice if the animation set is ready
Definition RayAnimationSet.hpp:38
~RayAnimationSet()
Definition RayAnimationSet.hpp:33
std::string getName(int index) const override
The clip name, as it appears in the file.
Definition RayAnimationSet.hpp:46
RayAnimationSet(std::string path)
Definition RayAnimationSet.hpp:29
int getFrameCount(int index) const override
How many frames this clip has.
Definition RayAnimationSet.hpp:50
int getSize() const override
Get the number of clips in this set.
Definition RayAnimationSet.hpp:42
A file's loaded animation clips, independent of any IModel bound to it - deleting every bound IModel ...
Definition IAnimationSet.hpp:26