Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
terraineditor.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
20
//------------------------------------------------------------------------------
21
#if WITH_NEBULA_EDITOR
22
#include "neweditor/core/editorpanel.h"
23
#include "
graphicsfeature/editor/terrain/terrainsession.h
"
24
25
namespace
Editor
26
{
27
struct
ToolView;
28
}
29
30
namespace
GraphicsFeature
31
{
32
33
class
TerrainPanel
final :
public
Editor::EditorPanel
34
{
35
__DeclareClass
(
TerrainPanel
)
36
public
:
37
TerrainPanel
();
38
virtual
~TerrainPanel
();
39
40
void
Draw()
override
;
41
bool
OnEditAction(Editor::EditAction action)
override
;
42
44
static
void
Register();
46
static
void
Clear();
47
48
protected
:
49
bool
OnSetup()
override
;
50
51
private
:
53
TerrainSession
* SelectedSession(
bool
create);
55
void
DrawTools(
TerrainSession
* session);
56
void
DrawSettings(
TerrainSession
* session);
57
void
DrawBiomes(
TerrainSession
* session);
58
void
DrawPlants(
TerrainSession
* session);
60
bool
SaveSession(
TerrainSession
* session);
61
63
static
bool
ViewportInput(
const
Editor::ToolView& view);
65
static
void
UpdateSessions();
66
static
void
ListUnsaved(
Util::Array<Util::String>
& out);
67
static
bool
SaveUnsaved();
68
70
void
CommandTerrain(
const
Util::Array<Util::String>
& args);
71
72
static
TerrainPanel
* instance;
73
74
TerrainBrush brush;
75
bool
editing;
77
TerrainSession::Map paintMap;
78
IndexT
paintIndex;
79
IndexT
selectedBiome;
80
IndexT
selectedPlant;
81
char
saveFile[256];
82
84
Ptr<TerrainSession>
strokeSession;
85
Math::vec3
hover;
86
bool
hoverValid;
87
};
88
89
}
// namespace GraphicsFeature
90
#endif
// WITH_NEBULA_EDITOR
91
//------------------------------------------------------------------------------
TerrainPanel
The terrain editor: sculpting the heightmap, painting where each biome and each plant is,...
TerrainSession
One terrain being edited: the Terrain component of an entity in a scene, the terrain file it names an...
Ptr
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition
ptr.h:38
Util::Array
Nebula's dynamic array class.
Definition
array.h:61
GraphicsFeature
Definition
graphicsfeatureunit.cc:66
__DeclareClass
#define __DeclareClass(type)
Math::vec3
A 3D vector.
Definition
vec3.h:37
terrainsession.h
IndexT
int IndexT
Definition
types.h:49
code
addons
graphicsfeature
editor
terrain
terraineditor.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.