TerraForge3D  2.3.1
3D Terrain And Landscape Generator
TextureBaker.h
1#pragma once
2
3#include "Base/Texture2D.h"
4#include "Base/FrameBuffer.h"
5#include "Base/ExportTexture.h"
6#include "Base/Camera.h"
7#include "Base/Shader.h"
8#include "Base/Model.h"
9
10#include "json/json.hpp"
11
12static const char* textueBakerSlots[] = {
13 "Slot 0 (Height Map)",
14 "Slot 1 (Custom)",
15 "Slot 2 (Custom)",
16 "Slot 3 (Custom)",
17 "Slot 4 (Custom)",
18 "Slot 5 (Custom)",
19 "Slot 6 (Custom)",
20 "Slot 7 (Custom)",
21 "Slot 8 (Custom)",
22 "Slot 9 (Custom)"
23};
24
25struct ApplicationState;
26
28{
29public:
32
33 void ShowSettings(bool* pOpen);
34
35 void Render(bool isPreview = true);
36
37 nlohmann::json Save();
38 void Load(nlohmann::json data);
39
40private:
41 void CalculateHeightMapMinMax();
42 void Update();
43 void Bake();
44
45public:
46 int tileResolution = 512;
47 int tileCount = 2;
48 int tileX = 0;
49 int tileY = 0;
50 bool useTiledExport = false;
51 float heightMapMinMax[2] = { -1.0f, 1.0f };
52 bool autoCalculateHeightMapMinMax = false;
53
54 int currentTextureSlot = 0;
55
56 Camera textureBakerCamera;
57
58 ApplicationState* appState = nullptr;
59 FrameBuffer* previewFrameBuffer = nullptr;
60 FrameBuffer* bakeFrameBuffer = nullptr;
61};
Definition: Camera.h:9
a class to store JSON values
Definition: json.hpp:17860