1 #ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
2 #define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
7 #include "./raylib.hpp"
8 #include "./raylib-cpp-utils.hpp"
27 other.bones =
nullptr;
29 other.framePoses =
nullptr;
39 static std::vector<ModelAnimation>
Load(
const std::string& fileName) {
40 unsigned int count = 0;
41 ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.c_str(), &count);
42 std::vector<ModelAnimation> mats(modelAnimations, modelAnimations + count);
44 RL_FREE(modelAnimations);
49 GETTERSETTER(
int, BoneCount, boneCount)
50 GETTERSETTER(::BoneInfo*, Bones, bones)
51 GETTERSETTER(
int, FrameCount, frameCount)
52 GETTERSETTER(::Transform**, FramePoses, framePoses)
70 other.bones =
nullptr;
72 other.framePoses =
nullptr;
81 ::UnloadModelAnimation(*
this);
88 ::UpdateModelAnimation(model, *
this, frame);
95 inline bool IsValid(const ::Model& model)
const {
96 return ::IsModelAnimationValid(model, *
this);
100 inline void set(const ::ModelAnimation& model) {
101 boneCount = model.boneCount;
103 frameCount = model.frameCount;
104 framePoses = model.framePoses;
109 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_