MyGUI  3.0.1
MyGUI_RotatingSkin.h
Go to the documentation of this file.
1 
7 /*
8  This file is part of MyGUI.
9 
10  MyGUI is free software: you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  MyGUI is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
22 */
23 #ifndef __MYGUI_ROTATING_SKIN_H__
24 #define __MYGUI_ROTATING_SKIN_H__
25 
26 #include "MyGUI_Prerequest.h"
27 #include "MyGUI_XmlDocument.h"
28 #include "MyGUI_Types.h"
30 #include "MyGUI_SubSkin.h"
31 
32 namespace MyGUI
33 {
34 
36  {
38 
39  public:
40  RotatingSkin();
41  virtual ~RotatingSkin();
42 
44  void setAngle(float _angle);
46  float getAngle() const { return mAngle; }
47 
52  void setCenter(const IntPoint &_center, bool _local = true);
54  IntPoint getCenter(bool _local = true) const;
55 
56  // метод для отрисовки себя
57  virtual void doRender();
58 
59  protected:
60  void recalculateAngles();
61 
62  private:
63  float mAngle;
64  IntPoint mCenterPos;
65  bool mLocalCenter;
66 
67  /*
68  0 3
69  1 2
70  */
71  float mBaseAngles[4];
72  float mBaseDistances[4];
73  };
74 
75 } // namespace MyGUI
76 
77 #endif // __MYGUI_ROTATING_SKIN_H__