add modeltree:get_model(index)

This commit is contained in:
MihailRis
2024-07-02 17:06:33 +03:00
parent 28ceffde9e
commit 3fe66e134d
8 changed files with 54 additions and 21 deletions
+4
View File
@@ -28,6 +28,10 @@ void Entity::destroy() {
}
}
rigging::Rig& Entity::getModeltree() const {
return registry.get<rigging::Rig>(entity);
}
Entities::Entities(Level* level) : level(level) {
}
+4 -1
View File
@@ -69,7 +69,8 @@ class LineBatch;
class ModelBatch;
class Frustum;
class Entities;
namespace riggining {
namespace rigging {
struct Rig;
class RigConfig;
}
@@ -112,6 +113,8 @@ public:
return registry.get<Scripting>(entity);
}
rigging::Rig& getModeltree() const;
entityid_t getUID() const {
return registry.get<EntityId>(entity).uid;
}
+4
View File
@@ -101,6 +101,10 @@ namespace rigging {
std::string_view src,
std::string_view file
);
const std::vector<RigNode*>& getNodes() const {
return nodes;
}
};
};