MyGUI: MyGUI_RotatingSkin.h Source File

MyGUI 3.4.2

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

- File List
- Globals

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
15namespace MyGUI
16{
17
18 class MYGUI_EXPORT RotatingSkin :
19 public ISubWidgetRect
20 {
21 MYGUI_RTTI_DERIVED( RotatingSkin )
22
23 public:
24 RotatingSkin();
25
27 void setAngle(float _angle);
29 float getAngle() const;
30
34 void setCenter(const IntPoint& _center);
36 IntPoint getCenter(bool _local = true) const;
37
38 void setAlpha(float _alpha) override;
39
40 void setVisible(bool _visible) override;
41
42 void setStateData(IStateInfo* _data) override;
43
44 void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
45 void destroyDrawItem() override;
46
47 // метод для отрисовки себя
48 void doRender() override;
49
50 /*internal:*/
51 void _updateView() override;
52 void _correctView() override;
53
54 void _setAlign(const IntSize& _oldsize) override;
55
56 void _setUVSet(const FloatRect& _rect) override;
57 void _setColour(const Colour& _value) override;
58
59 protected:
60 void _rebuildGeometry();
61
62 private:
63 bool mGeometryOutdated;
64
65 float mAngle;
66 IntPoint mCenterPos;
67
68 enum {RECT_VERTICIES_COUNT = 4, GEOMETRY_VERTICIES_TOTAL_COUNT = 8};
69 FloatPoint mResultVerticiesPos[GEOMETRY_VERTICIES_TOTAL_COUNT];
70 FloatPoint mResultVerticiesUV[GEOMETRY_VERTICIES_TOTAL_COUNT];
71
72 bool mEmptyView;
73
74 VertexColourType mVertexFormat;
75 uint32 mCurrentColour;
76
77 FloatRect mCurrentTexture;
78 IntCoord mCurrentCoord;
79
80 ILayerNode* mNode;
81 RenderItem* mRenderItem;
82 };
83
84} // namespace MyGUI
85
86#endif // MYGUI_ROTATING_SKIN_H_
MyGUI_ISubWidgetRect.h
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:48
MyGUI_RenderFormat.h
MyGUI_Types.h
MyGUI::ILayerNode
Definition MyGUI_ILayerNode.h:30
MyGUI::IStateInfo
Definition MyGUI_IStateInfo.h:18
MyGUI::ISubWidgetRect
Definition MyGUI_ISubWidgetRect.h:19
MyGUI::ITexture
Definition MyGUI_ITexture.h:28
MyGUI::RenderItem
Definition MyGUI_RenderItem.h:23
MyGUI::RotatingSkin
Definition MyGUI_RotatingSkin.h:20
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::uint32
uint32_t uint32
Definition MyGUI_Types.h:48
MyGUI::Colour
Definition MyGUI_Colour.h:17
MyGUI::VertexColourType
Definition MyGUI_RenderFormat.h:16
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< int >
MyGUI::types::TRect< float >
MyGUI::types::TSize< int >