TerraForge3D  2.3.1
3D Terrain And Landscape Generator
ProjectData.h
1#pragma once
2
3#include <string>
4
5#include "Base/Texture2D.h"
6#include "Base/Heightmap.h"
7#include "json/json.hpp"
8
10
12{
13public:
16
17 void SetId(std::string id);
18
19 std::string GetId();
20
21 nlohmann::json GetDatabase();
22
23 void RegisterAsset(std::string uid, std::string path);
24
25 std::string GetAsset(std::string id);
26
27 bool AssetExists(std::string id);
28
29 void SetDatabase(nlohmann::json db);
30
31 void SaveDatabase();
32
33 std::string GetResourcePath();
34
35 std::string SaveTexture(Texture2D *texture);
36 std::string SaveResource(std::string folder, std::string path);
37
38 static ProjectManager *Get();
39
40public:
41 ApplicationState *appState = nullptr;
42 std::string projectID = "";
43 nlohmann::json projectDatase;
44private:
45 static ProjectManager *s_ProjectManager;
46};
a class to store JSON values
Definition: json.hpp:17860