MyGUI_RotatingSkin.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_ROTATING_SKIN_H_
#define MYGUI_ROTATING_SKIN_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Types.h"
#include "MyGUI_ISubWidgetRect.h"
#include "MyGUI_RenderFormat.h"
namespace MyGUI
{
class MYGUI_EXPORT RotatingSkin : public ISubWidgetRect
{
MYGUI_RTTI_DERIVED(RotatingSkin)
public:
RotatingSkin();
void setAngle(float _angle);
float getAngle() const;
void setCenter(const IntPoint& _center);
IntPoint getCenter(bool _local = true) const;
void setAlpha(float _alpha) override;
void setVisible(bool _visible) override;
void setStateData(IStateInfo* _data) override;
void createDrawItem(ITexture* _texture, ILayerNode* _node) override;
void destroyDrawItem() override;
// метод для отрисовки себя
void doRender() override;
/*internal:*/
void _updateView() override;
void _correctView() override;
void _setAlign(const IntSize& _oldsize) override;
void _setUVSet(const FloatRect& _rect) override;
void _setColour(const Colour& _value) override;
protected:
void _rebuildGeometry();
private:
bool mGeometryOutdated{false};
float mAngle{0.0f};
IntPoint mCenterPos;
enum
{
RECT_VERTICIES_COUNT = 4,
GEOMETRY_VERTICIES_TOTAL_COUNT = 8
};
FloatPoint mResultVerticiesPos[GEOMETRY_VERTICIES_TOTAL_COUNT];
FloatPoint mResultVerticiesUV[GEOMETRY_VERTICIES_TOTAL_COUNT];
bool mEmptyView{false};
VertexColourType mVertexFormat;
uint32 mCurrentColour{0xFFFFFFFF};
FloatRect mCurrentTexture;
IntCoord mCurrentCoord;
ILayerNode* mNode{nullptr};
RenderItem* mRenderItem{nullptr};
};
} // namespace MyGUI
#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