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)
71 other.bones =
nullptr;
73 other.framePoses =
nullptr;
82 ::UnloadModelAnimation(*
this);
89 ::UpdateModelAnimation(model, *
this, frame);
96 inline bool IsValid(const ::Model& model)
const {
97 return ::IsModelAnimationValid(model, *
this);
101 inline void set(const ::ModelAnimation& model) {
102 boneCount = model.boneCount;
104 frameCount = model.frameCount;
105 framePoses = model.framePoses;
110 #endif // RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_