7 #ifndef CAFU_TOOL_TERRAIN_EDIT_HPP_INCLUDED
8 #define CAFU_TOOL_TERRAIN_EDIT_HPP_INCLUDED
11 #include "MapTerrain.hpp"
14 #include "Templates/Array.hpp"
16 #include "wx/bitmap.h"
71 void GenerateTerrain(
int Octaves,
double Frequency,
double Persistence,
double Lacunarity,
int Seed);
80 void ExportHeightMap(wxString FileName, ExportFileTypeE ExportFileType);
92 int GetWxEventID()
const {
return ChildFrameT::ID_MENU_TOOLS_TOOL_TERRAINEDITOR; }
94 void OnActivate(
ToolT* OldTool);
95 void OnDeactivate(
ToolT* NewTool);
100 bool OnLMouseUp2D (
ViewWindow2DT& ViewWindow, wxMouseEvent& ME);
101 bool OnMMouseUp2D (
ViewWindow2DT& ViewWindow, wxMouseEvent& ME);
102 bool OnMouseMove2D (
ViewWindow2DT& ViewWindow, wxMouseEvent& ME);
103 int OnContextMenu2D(
ViewWindow2DT& ViewWindow, wxContextMenuEvent& CE, wxMenu& Menu);
105 bool OnKeyDown3D (
ViewWindow3DT& ViewWindow, wxKeyEvent& KE);
108 bool OnLMouseUp3D (
ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
109 bool OnMMouseUp3D (
ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
110 bool OnMouseMove3D (
ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
133 bool m_IsRecSelfNotify;
135 mutable bool m_RenderUpdateBitmap;
136 mutable bool m_RenderUpdateTool;
137 mutable wxBitmap m_RenderBitmap;
141 mutable wxPoint m_LastRenderPosBL;
142 mutable wxPoint m_LastRenderPosTR;
143 mutable wxPoint m_PointTLToolOff;
144 mutable int m_SizeXTool;
145 mutable int m_SizeYTool;
146 mutable wxPoint m_ToolRenderPosition;
147 mutable int m_ToolRadiusX;
148 mutable int m_ToolRadiusY;
150 wxPoint m_HeightDataPos;
151 ToolModeE m_ToolMode;
156 wxPoint m_EditHeigthMapPos;
161 unsigned short m_ReferenceHeight;
164 int m_NoiseWeightsRes;
166 int m_GaussWeightsRes;
175 ColorGradientE m_CurrentColorGradient;
183 void SetEditMode(ToolModeE ToolMode);
188 void DoEdit(
bool Force=
false);
192 void SetTerrain(
MapTerrainT* NewTerrain,
bool UpdateObs_VisChanged=
true);
195 void CommitChanges();
199 void SetHeightDataPos(
const wxPoint& HeightDataPos);
202 float GetToolHeight_World()
const;
213 wxBitmap GetScaledBitmap(
float x,
float y,
float width,
float height,
unsigned int NewSizeX,
unsigned int NewSizeY)
const;
216 void PickReHeightValue();
221 int GetRadius()
const;
224 void UpdateToolInformation();
This class provides auxiliary means for rendering a 3D view.
Definition: Renderer3D.hpp:30
This class implements the rendering into a 2D view.
Definition: Renderer2D.hpp:22
MapElemModDetailE
Definition: ObserverPattern.hpp:37
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
Definition: DialogTerrainEdit.hpp:19
Definition: ObserverPattern.hpp:64
The TerrainT class represents a terrain in a map.
Definition: MapTerrain.hpp:22
Definition: ObserverPattern.hpp:158
unsigned long GetResolution() const
Gets the terrains heigth data resolution side length.
Definition: MapTerrain.hpp:57
Definition: ChildFrameViewWin2D.hpp:24
Definition: ChildFrameViewWin3D.hpp:21
This file provides the classes for the Observer pattern as described in the book by the GoF...
Definition: TypeSys.hpp:52
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
This is the base class for all elements ("objects") that can exist in a map.
Definition: MapElement.hpp:57