MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_RotatingSkin.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_ROTATING_SKIN_H__
23 #define __MYGUI_ROTATING_SKIN_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Types.h"
27 #include "MyGUI_ISubWidgetRect.h"
28 #include "MyGUI_RenderFormat.h"
29
30 namespace MyGUI
31 {
32
33 class MYGUI_EXPORT RotatingSkin :
34 public ISubWidgetRect
35 {
36 MYGUI_RTTI_DERIVED( RotatingSkin )
37
38 public:
39 RotatingSkin();
40 virtual ~RotatingSkin();
41
43 void setAngle(float _angle);
45 float getAngle() const;
46
50 void setCenter(const IntPoint& _center);
52 IntPoint getCenter(bool _local = true) const;
53
54 virtual void setAlpha(float _alpha);
55
56 virtual void setVisible(bool _visible);
57
58 virtual void setStateData(IStateInfo* _data);
59
60 virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
61 virtual void destroyDrawItem();
62
63 // метод для отрисовки себя
64 virtual void doRender();
65
66 /*internal:*/
67 virtual void _updateView();
68 virtual void _correctView();
69
70 virtual void _setAlign(const IntSize& _oldsize);
71
72 virtual void _setUVSet(const FloatRect& _rect);
73 virtual void _setColour(const Colour& _value);
74
75 protected:
76 void _rebuildGeometry();
77
78 private:
79 bool mGeometryOutdated;
80
81 float mAngle;
82 IntPoint mCenterPos;
83
84 enum {RECT_VERTICIES_COUNT = 4, GEOMETRY_VERTICIES_TOTAL_COUNT = 8};
85 FloatPoint mResultVerticiesPos[GEOMETRY_VERTICIES_TOTAL_COUNT];
86 FloatPoint mResultVerticiesUV[GEOMETRY_VERTICIES_TOTAL_COUNT];
87
88 bool mEmptyView;
89
90 VertexColourType mVertexFormat;
91 uint32 mCurrentColour;
92
93 FloatRect mCurrentTexture;
94 IntCoord mCurrentCoord;
95
96 ILayerNode* mNode;
97 RenderItem* mRenderItem;
98 };
99
100 } // namespace MyGUI
101
102 #endif // __MYGUI_ROTATING_SKIN_H__
MyGUI::types::TCoord
Definition: MyGUI_TCoord.h:35
MyGUI::RotatingSkin
Definition: MyGUI_RotatingSkin.h:33
MyGUI::uint32
unsigned int uint32
Definition: MyGUI_Types.h:63
MyGUI::types::TPoint< int >
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:42
MyGUI::ISubWidgetRect
Definition: MyGUI_ISubWidgetRect.h:32
MyGUI_Prerequest.h
MyGUI::IStateInfo
Definition: MyGUI_IStateInfo.h:31
MyGUI::types::TSize< int >
MyGUI::RenderItem
Definition: MyGUI_RenderItem.h:37
MyGUI_Types.h
MyGUI::VertexColourType
Definition: MyGUI_RenderFormat.h:30
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::types::TRect< float >
MyGUI::ITexture
Definition: MyGUI_ITexture.h:41
MyGUI_ISubWidgetRect.h
MyGUI::Colour
Definition: MyGUI_Colour.h:31
MyGUI_RenderFormat.h