11#ifndef RAYANIMATIONSET_HPP_
12#define RAYANIMATIONSET_HPP_
18#include "IAnimationSet.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 AnimationSet class - owns the loaded clips, independent of any RayModel bound to it.
Definition RayAnimationSet.hpp:26
raylib::ModelAnimation * handle() const
Definition RayAnimationSet.hpp:54
bool isReady() const override
Definition RayAnimationSet.hpp:38
~RayAnimationSet()
Definition RayAnimationSet.hpp:33
std::string getName(int index) const override
Definition RayAnimationSet.hpp:46
RayAnimationSet(std::string path)
Definition RayAnimationSet.hpp:29
int getFrameCount(int index) const override
Definition RayAnimationSet.hpp:50
int getSize() const override
Definition RayAnimationSet.hpp:42