Move classes Mesh and StaticMesh to UwURenderEngine project. Because they depended from UwURenderEngine
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user