Skip to content

Commit bd637c2

Browse files
Fixed references to boneCount, bones, bindPose to reflect access to ModelSkeleton struct in raylib v6
1 parent b29eac8 commit bd637c2

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
cmake-build-debug
66
.idea
77
docs
8+
/.vs

include/Model.hpp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,14 @@ class Model : public ::Model {
5858
other.meshes = nullptr;
5959
other.materials = nullptr;
6060
other.meshMaterial = nullptr;
61-
other.boneCount = 0;
62-
other.bones = nullptr;
63-
other.bindPose = nullptr;
61+
62+
/*
63+
The Animation Data is now stored within a separate struct called
64+
`ModelSkeleton`. The changes below reflect this update.
65+
*/
66+
other.skeleton.boneCount = 0;
67+
other.skeleton.bones = nullptr;
68+
other.skeleton.bindPose = nullptr;
6469
}
6570

6671
GETTERSETTER(::Matrix, Transform, transform)
@@ -69,9 +74,9 @@ class Model : public ::Model {
6974
GETTERSETTER(::Mesh*, Meshes, meshes)
7075
GETTERSETTER(::Material*, Materials, materials)
7176
GETTERSETTER(int*, MeshMaterial, meshMaterial)
72-
GETTERSETTER(int, BoneCount, boneCount)
73-
GETTERSETTER(::BoneInfo*, Bones, bones)
74-
GETTERSETTER(::Transform*, BindPose, bindPose)
77+
GETTERSETTER(int, BoneCount, skeleton.boneCount)
78+
GETTERSETTER(::BoneInfo*, Bones, skeleton.bones)
79+
GETTERSETTER(::Transform*, BindPose, skeleton.bindPose)
7580

7681
Model& operator=(const ::Model& model) {
7782
set(model);
@@ -93,9 +98,9 @@ class Model : public ::Model {
9398
other.meshes = nullptr;
9499
other.materials = nullptr;
95100
other.meshMaterial = nullptr;
96-
other.boneCount = 0;
97-
other.bones = nullptr;
98-
other.bindPose = nullptr;
101+
other.skeleton.boneCount = 0;
102+
other.skeleton.bones = nullptr;
103+
other.skeleton.bindPose = nullptr;
99104

100105
return *this;
101106
}
@@ -240,9 +245,9 @@ class Model : public ::Model {
240245
materials = model.materials;
241246
meshMaterial = model.meshMaterial;
242247

243-
boneCount = model.boneCount;
244-
bones = model.bones;
245-
bindPose = model.bindPose;
248+
skeleton.boneCount = model.skeleton.boneCount;
249+
skeleton.bones = model.skeleton.bones;
250+
skeleton.bindPose = model.skeleton.bindPose;
246251
}
247252
};
248253

0 commit comments

Comments
 (0)