MyGUI: MyGUI_RotatingSkin.h Source File

MyGUI 3.4.3

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