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"
13#include "MyGUI_RenderFormat.h"
14
15namespace MyGUI
16{
17
19 {
21
22 public:
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_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
void setAlpha(float _alpha) override
void setAngle(float _angle)
void _setColour(const Colour &_value) override
void _setUVSet(const FloatRect &_rect) override
IntPoint getCenter(bool _local=true) const
void setStateData(IStateInfo *_data) override
void _correctView() override
void destroyDrawItem() override
void setVisible(bool _visible) override
void createDrawItem(ITexture *_texture, ILayerNode *_node) override
void setCenter(const IntPoint &_center)
void _setAlign(const IntSize &_oldsize) override
uint32_t uint32
Definition MyGUI_Types.h:48
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
types::TRect< float > FloatRect
Definition MyGUI_Types.h:34
types::TPoint< float > FloatPoint
Definition MyGUI_Types.h:28
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
types::TSize< int > IntSize
Definition MyGUI_Types.h:30