1 #ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
2 #define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
7 #include "./raylib.hpp"
8 #include "./raylib-cpp-utils.hpp"
28 static std::vector<ModelAnimation>
Load(
const std::string& fileName) {
30 ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
31 return std::vector<ModelAnimation>(modelAnimations, modelAnimations + count);
34 GETTERSETTER(
int, BoneCount, boneCount)
35 GETTERSETTER(::BoneInfo*, Bones, bones)
36 GETTERSETTER(
int, FrameCount, frameCount)
37 GETTERSETTER(::Transform**, FramePoses, framePoses)
48 ::UnloadModelAnimation(*
this);
55 ::UpdateModelAnimation(model, *
this, frame);
62 inline bool IsValid(const ::Model& model)
const {
63 return ::IsModelAnimationValid(model, *
this);
67 inline void set(const ::ModelAnimation& model) {
68 boneCount = model.boneCount;
70 frameCount = model.frameCount;
71 framePoses = model.framePoses;
76 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_