Cafu Engine
TransformJoint.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_MODELEDITOR_TRANSFORM_JOINT_HPP_INCLUDED
8 #define CAFU_MODELEDITOR_TRANSFORM_JOINT_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 #include "Math3D/Vector3.hpp"
12 
13 
14 namespace ModelEditor
15 {
16  class ModelDocumentT;
17 
19  {
20  public:
21 
22  CommandTransformJointT(ModelDocumentT* ModelDoc, unsigned int JointNr, char Type, const Vector3fT& v);
23 
24  // CommandT implementation.
25  bool Do();
26  void Undo();
27  wxString GetName() const;
28 
29 
30  private:
31 
32  Vector3fT& GetModelVec();
33 
34  ModelDocumentT* m_ModelDoc;
35  const unsigned int m_JointNr;
36  const char m_Type;
37  const Vector3fT m_NewVec;
38  const Vector3fT m_OldVec;
39  };
40 }
41 
42 #endif
Definition: TransformJoint.hpp:18
bool Do()
This method executes the command.
Definition: TransformJoint.cpp:25
wxString GetName() const
Returns the name (a description) of the command.
Definition: TransformJoint.cpp:63
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
Definition: ModelDocument.hpp:30
void Undo()
This method un-does the command.
Definition: TransformJoint.cpp:46