add bone "offset" parameter & update player model

This commit is contained in:
MihailRis
2024-07-21 18:27:11 +03:00
parent 3590bd14cd
commit 0333ce6990
8 changed files with 151 additions and 81 deletions
+7 -1
View File
@@ -40,13 +40,15 @@ namespace rigging {
size_t index;
std::string name;
std::vector<std::unique_ptr<Bone>> bones;
glm::vec3 offset;
public:
ModelReference model;
Bone(
size_t index,
std::string name,
std::string model,
std::vector<std::unique_ptr<Bone>> bones);
std::vector<std::unique_ptr<Bone>> bones,
glm::vec3 offset);
void setModel(const std::string& name);
@@ -58,6 +60,10 @@ namespace rigging {
return index;
}
glm::vec3 getOffset() const {
return offset;
}
const auto& getSubnodes() const {
return bones;
}