1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

no more children

This commit is contained in:
Lars Mueller 2025-01-20 14:02:30 +01:00
parent 8dbcaf25c3
commit d73b86c16a
3 changed files with 5 additions and 9 deletions

View file

@ -329,8 +329,6 @@ public:
return {trs};
}
//! List of child joints
std::vector<SJoint *> Children;
//! List of attached meshes
std::vector<u32> AttachedMeshes;

View file

@ -528,8 +528,6 @@ bool CXMeshFileLoader::parseDataObjectFrame(SkinnedMesh::SJoint *Parent)
#ifdef _XREADER_DEBUG
os::Printer::log("using joint ", name.c_str(), ELL_DEBUG);
#endif
if (Parent)
Parent->Children.push_back(joint);
}
// Now inside a frame.

View file

@ -404,12 +404,12 @@ SECTION("simple skin")
};
// Check the node hierarchy
const auto parent = findJoint([](auto joint) {
return !joint->Children.empty();
const auto *parent = findJoint([](auto *joint) {
return !joint->ParentJointID;
});
const auto child = findJoint([&](auto *joint) {
return joint->ParentJointID && *joint->ParentJointID == parent->JointID;
});
REQUIRE(parent->Children.size() == 1);
const auto child = parent->Children[0];
REQUIRE(child != parent);
SECTION("transformations are correct")
{