Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-item.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // INTERNAL INCLUDES
21 #include <dali/public-api/common/vector-wrapper.h>
22 #include <dali/public-api/actors/layer.h>
23 #include <dali/public-api/math/matrix.h>
24
25 namespace Dali
26 {
27
28 namespace Internal
29 {
30
31 namespace SceneGraph
32 {
33
34 class Renderer;
35 class RenderItem;
36
37 typedef std::vector< RenderItem > RendererItemContainer;
38
39 /**
40  * A render-item is a renderer & modelView matrix pair.
41  */
42 class RenderItem
43 {
44 public:
45
46   /**
47    * Create a new render-item.
48    */
49   RenderItem();
50
51   /**
52    * Non-virtual destructor; RenderItem is not suitable as a base class.
53    */
54   ~RenderItem();
55
56   /**
57    * Reset the render-item.
58    */
59   void Reset();
60
61   /**
62    * Retrieve the renderer.
63    * @return The renderer.
64    */
65   const Renderer* GetRenderer() const;
66
67   /**
68    * Set the renderer
69    * @param[in] renderer The renderer
70    */
71   void SetRenderer( Renderer* renderer );
72
73   /**
74    * Retrieve the modelView matrix.
75    * @return The modelView matrix.
76    */
77   Matrix& GetModelViewMatrix();
78
79   /**
80    * Retrieve the modelView matrix.
81    * @return The modelView matrix.
82    */
83   const Matrix& GetModelViewMatrix() const;
84
85 private:
86
87   // RenderItems should not be copied as they are heavy
88   RenderItem( const RenderItem& item );
89   RenderItem& operator=( const RenderItem& item );
90
91   Renderer* mRenderer;
92   Matrix mModelViewMatrix;
93
94 };
95
96 } // namespace SceneGraph
97
98 } // namespace Internal
99
100 } // namespace Dali
101
102 #endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__