|
| CommandModifyTerrainT (MapDocumentT &MapDoc, MapTerrainT *Terrain, const ArrayT< unsigned short > &NewHeightData, const wxPoint &Position, unsigned int SizeX, unsigned int SizeY) |
| Constructor to modify a terrain with given new height data. More...
|
|
bool | Do () |
| This method executes the command. More...
|
|
void | Undo () |
| This method un-does the command. More...
|
|
wxString | GetName () const |
| Returns the name (a description) of the command. More...
|
|
Public Member Functions inherited from CommandT |
| CommandT (bool ShowInHistory=true, bool SuggestsSave=true) |
| The constructor. More...
|
|
virtual | ~CommandT () |
| The virtual destructor. More...
|
|
bool | ShowInHistory () const |
| Whether the command should be shown in the undo/redo history. More...
|
|
bool | SuggestsSave () const |
| Whether the command suggests to save the document when its closed and hasn't been saved between the command execution and the closing (selection changes for example don't suggest to save the document since no important changes have been made). More...
|
|
bool | IsDone () const |
| Whether the command has been executed. More...
|
|
unsigned long | GetID () const |
| Returns the commands unique ID. More...
|
|
CommandModifyTerrainT::CommandModifyTerrainT |
( |
MapDocumentT & |
MapDoc, |
|
|
MapTerrainT * |
Terrain, |
|
|
const ArrayT< unsigned short > & |
NewHeightData, |
|
|
const wxPoint & |
Position, |
|
|
unsigned int |
SizeX, |
|
|
unsigned int |
SizeY |
|
) |
| |
Constructor to modify a terrain with given new height data.
The terrains current height data is overwritten with the passed new height data. Note that the dimensions of the passed NewHeightData cannot be greater than the dimensions of the current height data.
- Parameters
-
MapDoc | The map document in which the terrain is existent. |
Terrain | Pointer to the terrain object that is to be modified. |
NewHeightData | The height data with which the terrain is modified. |
Position | The position in the terrains current height data. Beginning at this position the height data is overwritten with the new data from NewHeightData. |
SizeX | X size of the new height data. |
SizeY | Y size of the new height data. |
bool CommandModifyTerrainT::Do |
( |
| ) |
|
|
virtual |
This method executes the command.
- Returns
- true if the command succeeded, false if it failed.
Implements CommandT.
wxString CommandModifyTerrainT::GetName |
( |
| ) |
const |
|
virtual |
Returns the name (a description) of the command.
Implements CommandT.
void CommandModifyTerrainT::Undo |
( |
| ) |
|
|
virtual |
This method un-does the command.
Implements CommandT.
The documentation for this class was generated from the following files: