MyGUI: MyGUI_RotatingSkin.h Source File

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::TRect< float >
MyGUI_RenderFormat.h
MyGUI::ILayerNode
Definition: MyGUI_ILayerNode.h:27
MyGUI_ISubWidgetRect.h
MyGUI::types::TPoint< int >
MyGUI::RenderItem
Definition: MyGUI_RenderItem.h:22
MyGUI::uint32
unsigned int uint32
Definition: MyGUI_Types.h:48
MyGUI::IStateInfo
Definition: MyGUI_IStateInfo.h:16
MyGUI_Prerequest.h
MyGUI::VertexColourType
Definition: MyGUI_RenderFormat.h:15
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MyGUI::types::TSize< int >
MyGUI::ISubWidgetRect
Definition: MyGUI_ISubWidgetRect.h:17
MyGUI::ITexture
Definition: MyGUI_ITexture.h:26
MyGUI::Colour
Definition: MyGUI_Colour.h:16
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI_Types.h
MyGUI::types::TCoord
Definition: MyGUI_TCoord.h:20
MyGUI::RotatingSkin
Definition: MyGUI_RotatingSkin.h:18
MyGUI
Definition: MyGUI_ActionController.h:14