1#ifndef RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
2#define RAYLIB_CPP_INCLUDE_MODELANIMATION_HPP_
10#include "./raylib-cpp-utils.hpp"
11#include "./raylib.hpp"
28 other.bones =
nullptr;
29 other.framePoses =
nullptr;
37 static std::vector<ModelAnimation>
Load(
const std::string_view fileName) {
39 ::ModelAnimation* modelAnimations = ::LoadModelAnimations(fileName.data(), &count);
40 std::vector<ModelAnimation> mats(modelAnimations, modelAnimations + count);
42 RL_FREE(modelAnimations);
47 GETTERSETTER(
int, BoneCount, boneCount)
48 GETTERSETTER(::BoneInfo*, Bones, bones)
49 GETTERSETTER(
int, FrameCount, frameCount)
69 other.bones =
nullptr;
70 other.framePoses =
nullptr;
78 void Unload() { ::UnloadModelAnimation(*
this); }
84 ::UpdateModelAnimation(model, *
this, frame);
92 ::UpdateModelAnimationBones(model, *
this, frame);
99 [[nodiscard]]
bool IsValid(const ::Model& model)
const { return ::IsModelAnimationValid(model, *
this); }
101 void set(const ::ModelAnimation& model) {
102 boneCount = model.boneCount;
103 frameCount = model.frameCount;
105 framePoses = model.framePoses;
108 for (
int i = 0; i < 32; i++) {
109 name[i] = model.name[i];
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 & UpdateBones(const ::Model &model, int frame)
Update model animation mesh bone matrices (GPU skinning)
ModelAnimation & Update(const ::Model &model, int frame)
Update model animation pose.
void Unload()
Unload animation data.
All raylib-cpp classes and functions appear in the raylib namespace.