Cafu Engine
SetBPSubdivs.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_COMMAND_SET_BP_SUBDIVS_HPP_INCLUDED
8 #define CAFU_COMMAND_SET_BP_SUBDIVS_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 
12 
13 class MapBezierPatchT;
14 class MapDocumentT;
15 
16 
17 enum SubdivDirE
18 {
19  HORIZONTAL,
20  VERTICAL
21 };
22 
23 
25 {
26  public:
27 
28  /// Constructor.
29  CommandSetBPSubdivsT(MapDocumentT* MapDoc, MapBezierPatchT* BezierPatch, int Amount, SubdivDirE Direction);
30 
31  // Implementation of the CommandT interface.
32  bool Do();
33  void Undo();
34  wxString GetName() const;
35 
36 
37  private:
38 
39  MapDocumentT* m_MapDoc;
40  MapBezierPatchT* m_BezierPatch;
41 
42  const int m_NewAmount;
43  const int m_OldAmount;
44  const SubdivDirE m_Direction;
45 };
46 
47 #endif
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
CommandSetBPSubdivsT(MapDocumentT *MapDoc, MapBezierPatchT *BezierPatch, int Amount, SubdivDirE Direction)
Constructor.
Definition: SetBPSubdivs.cpp:13
This class represents a bezier patch.
Definition: MapBezierPatch.hpp:44
void Undo()
This method un-does the command.
Definition: SetBPSubdivs.cpp:43
Definition: SetBPSubdivs.hpp:24
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
wxString GetName() const
Returns the name (a description) of the command.
Definition: SetBPSubdivs.cpp:61
bool Do()
This method executes the command.
Definition: SetBPSubdivs.cpp:23