1#ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
2#define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
9#include "./raylib-cpp-utils.hpp"
29 other.bones =
nullptr;
30 other.framePoses =
nullptr;
40 static std::vector<ModelAnimation>
Load(
const std::string_view fileName) {
42 ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.data(), &count);
43 std::vector<ModelAnimation> mats(modelAnimations, modelAnimations + count);
45 RL_FREE(modelAnimations);
50 GETTERSETTER(
int, BoneCount, boneCount)
51 GETTERSETTER(::BoneInfo*, Bones, bones)
52 GETTERSETTER(
int, FrameCount, frameCount)
72 other.bones =
nullptr;
73 other.framePoses =
nullptr;
82 ::UnloadModelAnimation(*
this);
89 ::UpdateModelAnimation(model, *
this, frame);
96 bool IsValid(const ::Model& model)
const {
97 return ::IsModelAnimationValid(model, *
this);
101 void set(const ::ModelAnimation& model) {
102 boneCount = model.boneCount;
103 frameCount = model.frameCount;
105 framePoses = model.framePoses;
Matrix type (OpenGL style 4x4 - right handed, column major)
static std::vector< ModelAnimation > Load(const std::string_view fileName)
Load model animations from file.
bool IsValid(const ::Model &model) const
Check model animation skeleton match.
ModelAnimation & Update(const ::Model &model, int frame)
Update model animation pose.
void Unload()
Unload animation data.