7 #ifndef CAFU_MAP_TERRAIN_HPP_INCLUDED
8 #define CAFU_MAP_TERRAIN_HPP_INCLUDED
10 #include "MapPrimitive.hpp"
11 #include "MaterialSystem/Mesh.hpp"
12 #include "Terrain/Terrain.hpp"
97 void TrafoMirror(
unsigned int NormalAxis,
float Dist,
bool LockTexCoords)
override;
100 wxString GetDescription()
const {
return "Terrain"; }
103 void Save_cmap(std::ostream& OutFile,
unsigned long TerrainNr,
const MapDocumentT& MapDoc)
const;
122 unsigned long m_Resolution;
128 bool m_RenderEyeDropper;
130 mutable bool m_NeedsUpdate;
void RestoreTrafoState(const TrafoMementoT *TM) override
Restores the transform-related state of this element from the given memento.
Definition: MapTerrain.cpp:584
void SetMaterial(EditorMaterialI *Material)
Sets the terrain material.
Definition: MapTerrain.hpp:49
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
This class represents terrains, offering methods for LoD rendering and collision detection.
Definition: Terrain.hpp:17
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
const ArrayT< unsigned short > & GetHeightData() const
Gets a constant reference to the terrains height data.
Definition: MapTerrain.hpp:61
void TrafoRotate(const Vector3fT &RefPoint, const cf::math::AnglesfT &Angles, bool LockTexCoords) override
Rotates this element about the given reference point (in world-space).
Definition: MapTerrain.cpp:607
This class adds no functionality of its own, but only exists for proper type separation.
Definition: MapPrimitive.hpp:21
wxPoint TraceRay(const Vector3fT &Source, const Vector3fT &Direction) const
Traces the given ray and returns the position in the terrains height data when a hit with the terrain...
Definition: MapTerrain.cpp:522
This class manages the editor materials for a game configuration.
Definition: EditorMaterialManager.hpp:20
void TrafoScale(const Vector3fT &RefPoint, const Vector3fT &Scale, bool LockTexCoords) override
Scales this element about the given reference point (in world-space).
Definition: MapTerrain.cpp:640
void Transform(const Matrix4x4fT &Matrix, bool LockTexCoords) override
Why does this method not replace all the other Trafo*() methods? This method is the most generic...
Definition: MapTerrain.cpp:679
Definition: ModifyTerrain.hpp:17
An instance of this class encapsulates the transform-related state of a MapElementT.
Definition: MapElement.hpp:39
EditorMaterialI * GetMaterial() const
Gets the terrains current material.
Definition: MapTerrain.hpp:53
void TrafoMove(const Vector3fT &Delta, bool LockTexCoords) override
Translates this element by the given vector (in world-space).
Definition: MapTerrain.cpp:596
MapTerrainT(const BoundingBox3fT &Box=BoundingBox3fT(Vector3fT()), const wxString &HeightMapFile="", EditorMaterialI *Material=NULL)
Constructor.
Definition: MapTerrain.cpp:36
bool TracePixel(const wxPoint &Pixel, int Radius, const ViewWindow2DT &ViewWin) const
This method determines if this map element is intersected/affected by the specified disc in ViewWin...
Definition: MapTerrain.cpp:247
The TerrainT class represents a terrain in a map.
Definition: MapTerrain.hpp:22
MapTerrainT * Clone() const override
The virtual copy constructor.
Definition: MapTerrain.cpp:80
void TrafoMirror(unsigned int NormalAxis, float Dist, bool LockTexCoords) override
Mirrors this element along the given mirror plane (in world-space).
Definition: MapTerrain.cpp:656
Definition: EditorMaterial.hpp:21
Definition: ChangeTerrainRes.hpp:19
unsigned long GetResolution() const
Gets the terrains heigth data resolution side length.
Definition: MapTerrain.hpp:57
void LoadHeightData(const wxString &FileName)
Initializes the terrains height data from a file.
Definition: MapTerrain.cpp:501
Definition: ChildFrameViewWin2D.hpp:24
BoundingBox3fT GetBB() const
Returns the spatial bounding-box of this map element.
Definition: MapTerrain.cpp:93
void SetTerrainBounds(const BoundingBox3fT &Bounds)
Sets the bounds of the terrain.
Definition: MapTerrain.cpp:86
TrafoMementoT * GetTrafoState() const override
Returns a memento that encapsulates the transform-related state of this element.
Definition: MapTerrain.cpp:578
void SetToolBounds(int PosX, int PosY, int Radius)
Sets the bounds if the terrain edit tool.
Definition: MapTerrain.cpp:262
Definition: TypeSys.hpp:52
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
This class represents a polygonal mesh.
Definition: Mesh.hpp:45
This is a class for parsing text.
Definition: TextParser.hpp:21