File: MyGUI_RTTLayerNode.h

package info (click to toggle)
mygui 3.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,800 kB
  • sloc: cpp: 122,825; ansic: 30,231; xml: 15,792; cs: 12,601; tcl: 776; python: 397; makefile: 38
file content (89 lines) | stat: -rw-r--r-- 1,730 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*!
	@file
	@author		Albert Semenov
	@date		02/2008
*/

#ifndef MYGUI_RTT_LAYER_NODE_H_
#define MYGUI_RTT_LAYER_NODE_H_

#include "MyGUI_Prerequest.h"
#include "MyGUI_LayerNode.h"
#include "MyGUI_ITexture.h"
#include "MyGUI_LayerNodeAnimation.h"
#include <MyGUI_Timer.h>

namespace MyGUI
{

	class /*MYGUI_EXPORT */RTTLayerNode :
		public LayerNode
	{
		MYGUI_RTTI_DERIVED( RTTLayerNode )

	public:
		explicit RTTLayerNode(ILayer* _layer, ILayerNode* _parent = nullptr);
		~RTTLayerNode() override;

		// необходимо обновление нода
		void outOfDate(RenderItem* _item) override;

		// добавляем айтем к ноду
		void attachLayerItem(ILayerItem* _item) override;
		// удаляем айтем из нода
		void detachLayerItem(ILayerItem* _item) override;

		// рисует леер
		void renderToTarget(IRenderTarget* _target, bool _update) override;

		bool getCacheUsing() const
		{
			return mChacheUsing;
		}
		void setCacheUsing(bool _value);

		bool getAnimate() const
		{
			return mIsAnimate;
		}

		void setDestroy(bool _value)
		{
			mDestroy = _value;
		}
		bool getDestroy() const
		{
			return mDestroy;
		}

		void addLayerNodeAnimation(LayerNodeAnimation* _impl);

	private:
		void checkTexture();

	private:
		IVertexBuffer* mVertexBuffer;
		ITexture* mTexture;

		IntSize mTextureSize;
		IntCoord mCurrentCoord;

		bool mOutOfDateRtt;

		bool mMajorUpdate;
		bool mChacheUsing;
		bool mDestroy;
		bool mIsAnimate;

		typedef std::vector<LayerNodeAnimation*> VectorLayerNodeAnimation;
		VectorLayerNodeAnimation mLayerNodeAnimation;

		VectorQuadData mData;
		QuadData mDefaultData;

		MyGUI::Timer mTimer;
	};

} // namespace MyGUI

#endif // MYGUI_RTT_LAYER_NODE_H_