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
12
static
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
25
struct
ApplicationState
;
26
27
class
TextureBaker
28
{
29
public
:
30
TextureBaker
(
ApplicationState
* appState);
31
~TextureBaker
();
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
40
private
:
41
void
CalculateHeightMapMinMax();
42
void
Update();
43
void
Bake();
44
45
public
:
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
};
Camera
Definition:
Camera.h:9
FrameBuffer
Definition:
FrameBuffer.h:6
TextureBaker
Definition:
TextureBaker.h:28
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:17860
ApplicationState
Definition:
ApplicationState.h:192
TerraForge3D
include
Exporters
TextureBaker.h
Generated on Thu Apr 7 2022 14:10:50 for TerraForge3D by
1.9.3