Move classes Mesh and StaticMesh to UwURenderEngine project. Because they depended from UwURenderEngine

This commit is contained in:
Jiga228
2025-10-25 23:20:28 +07:00
parent 1f88e0f0b9
commit 740c80e8c7
13 changed files with 9 additions and 76 deletions
+2 -25
View File
@@ -1,33 +1,15 @@
#pragma once
#include <unordered_map>
#include <vector>
#include <string>
#include <Delegate/Delegate.h>
#include <glm/glm.hpp>
#include <atomic>
class ModelManager
{
public:
struct Voxel
{
glm::vec3 loc, color;
int mass;
};
class StaticModel
{
std::string name_;
std::vector<Voxel> voxels_;
glm::vec3 mass_center_;
public:
Delegate<const std::string&> OnDestroy;
StaticModel(const std::vector<Voxel>& voxels, std::string name);
~StaticModel();
const std::vector<Voxel>& GetVoxels() const { return voxels_; }
glm::vec3 GetMassCenter() const { return mass_center_; }
const std::string& GetName() const { return name_; }
//DATA
};
struct owner_counter
@@ -45,12 +27,7 @@ private:
static unsigned int FNV1aHash (const char *buf);
void OnDestroySometimeModelCaller(const std::string& name);
public:
Delegate<std::string> OnDestroySometimeModel;
Delegate<StaticModel*> OnLoadSometimeModel;
~ModelManager();
StaticModel* LoadModel(const std::string& name);