MyGUI 3.2.2

MyGUI_RotatingSkin.h
Go to the documentation of this file.
1 /*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7 #ifndef MYGUI_ROTATING_SKIN_H_
8 #define MYGUI_ROTATING_SKIN_H_
9
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Types.h"
12 #include "MyGUI_ISubWidgetRect.h"
13 #include "MyGUI_RenderFormat.h"
14
15 namespace MyGUI
16 {
17
18 class MYGUI_EXPORT RotatingSkin :
19 public ISubWidgetRect
20 {
21 MYGUI_RTTI_DERIVED( RotatingSkin )
22
23 public:
24 RotatingSkin();
25 virtual ~RotatingSkin();
26
28 void setAngle(float _angle);
30 float getAngle() const;
31
35 void setCenter(const IntPoint& _center);
37 IntPoint getCenter(bool _local = true) const;
38
39 virtual void setAlpha(float _alpha);
40
41 virtual void setVisible(bool _visible);
42
43 virtual void setStateData(IStateInfo* _data);
44
45 virtual void createDrawItem(ITexture* _texture, ILayerNode* _node);
46 virtual void destroyDrawItem();
47
48 // метод для отрисовки себя
49 virtual void doRender();
50
51 /*internal:*/
52 virtual void _updateView();
53 virtual void _correctView();
54
55 virtual void _setAlign(const IntSize& _oldsize);
56
57 virtual void _setUVSet(const FloatRect& _rect);
58 virtual void _setColour(const Colour& _value);
59
60 protected:
61 void _rebuildGeometry();
62
63 private:
64 bool mGeometryOutdated;
65
66 float mAngle;
67 IntPoint mCenterPos;
68
69 enum {RECT_VERTICIES_COUNT = 4, GEOMETRY_VERTICIES_TOTAL_COUNT = 8};
70 FloatPoint mResultVerticiesPos[GEOMETRY_VERTICIES_TOTAL_COUNT];
71 FloatPoint mResultVerticiesUV[GEOMETRY_VERTICIES_TOTAL_COUNT];
72
73 bool mEmptyView;
74
75 VertexColourType mVertexFormat;
76 uint32 mCurrentColour;
77
78 FloatRect mCurrentTexture;
79 IntCoord mCurrentCoord;
80
81 ILayerNode* mNode;
82 RenderItem* mRenderItem;
83 };
84
85 } // namespace MyGUI
86
87 #endif // MYGUI_ROTATING_SKIN_H_
MyGUI::types::TCoord< int >
MyGUI::RotatingSkin
Definition: MyGUI_RotatingSkin.h:18
MyGUI::uint32
unsigned int uint32
Definition: MyGUI_Types.h:48
MyGUI::types::TPoint< int >
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:27
MyGUI::ISubWidgetRect
Definition: MyGUI_ISubWidgetRect.h:17
MyGUI_Prerequest.h
MyGUI::IStateInfo
Definition: MyGUI_IStateInfo.h:16
MyGUI::types::TSize< int >
MyGUI::RenderItem
Definition: MyGUI_RenderItem.h:22
MyGUI_Types.h
MyGUI::VertexColourType
Definition: MyGUI_RenderFormat.h:15
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::types::TRect< float >
MyGUI::ITexture
Definition: MyGUI_ITexture.h:26
MyGUI_ISubWidgetRect.h
MyGUI::Colour
Definition: MyGUI_Colour.h:16
MyGUI_RenderFormat.h