TerraForge3D
2.3.1
3D Terrain And Landscape Generator
CPUNodeEditor.h
1
#pragma once
2
3
#include "json/json.hpp"
4
5
#include <string>
6
#include <mutex>
7
8
#include "Base/NodeEditor/NodeEditor.h"
9
10
#define DUMMY_NODE_COLOR 20, 31, 128
11
#define MATH_NODE_COLOR 11, 99, 20
12
#define VALUE_NODE_COLOR 11, 99, 90
13
#define OUTPUT_NODE_COLOR 79, 9, 32
14
#define OP_NODE_COLOR 39, 0, 87
15
#define IMAGE_NODE_COLOR 143, 95, 0
16
#define NOISE_NODE_COLOR 115, 90, 17
17
18
struct
ApplicationState
;
19
20
namespace
CPUNodeEditorE
21
{
22
23
enum
CPUNodePinType
24
{
25
Float = 0,
26
Boolean,
27
Vec2,
28
Vec3,
29
MeshNodePinTypeCount
30
};
31
32
enum
CPUNodeType
33
{
34
Dummy = 0,
35
Output,
36
MeshCoordinates,
37
MinMeshCoordinates,
38
MaxMeshCoordinates,
39
TextureCoordinates,
40
TimeBasedSeed,
41
RandomNumber,
42
Duplicate,
43
MinVal,
44
Add,
45
Sub,
46
Mul,
47
Div,
48
Sin,
49
Square,
50
Cos,
51
Tan,
52
Abs,
53
Blend,
54
Curve,
55
NoiseOpenSimplex2,
56
NoiseOpenSimplex2S,
57
NoiseCellular,
58
NoisePerlin,
59
NoiseValueCubic,
60
NoiseValue,
61
MathFunction,
62
Pixelate,
63
Texture,
64
Heightmap
,
65
RectangleMask,
66
Visualizer,
67
Hill,
68
Clamp,
69
MeshNodeTypeCount
70
};
71
72
73
}
74
75
// Temporary Fix
76
#define MeshNodeEditor CPUNodeEditorE
77
#define MeshNodeType CPUNodeType
78
79
class
CPUNodeEditor
80
{
81
public
:
82
CPUNodeEditor
(
ApplicationState
*appState);
83
~CPUNodeEditor
();
84
85
nlohmann::json
Save();
86
void
Load(
nlohmann::json
data);
87
88
void
ShowSetting(
int
id
);
89
90
void
Update();
91
92
float
EvaluateAt(
NodeInputParam
param);
93
94
bool
windowStat =
false
;
95
bool
uiActive =
false
;
96
bool
enabled =
true
;
97
double
time = 0;
98
std::string uid;
99
std::string name;
100
ApplicationState
*appState;
101
NodeEditor
*editor;
102
103
std::mutex m;
104
};
CPUNodeEditor
Definition:
CPUNodeEditor.h:80
Heightmap
Definition:
Heightmap.h:7
NodeEditor
Definition:
NodeEditor.h:152
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:17860
ApplicationState
Definition:
ApplicationState.h:192
NodeInputParam
Definition:
NodeEditor.h:31
TerraForge3D
include
Generators
CPUNodeEditor
CPUNodeEditor.h
Generated on Thu Apr 7 2022 14:10:50 for TerraForge3D by
1.9.3