1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/actors/layer.h>
24 #include <dali/public-api/math/matrix.h>
25 #include <dali/internal/update/nodes/node.h>
43 typedef std::vector< RenderItem > RendererItemContainer;
46 * A render-item is a renderer & modelView matrix pair.
53 * Construct a new RenderItem
55 static RenderItem* New();
58 * Non-virtual destructor; RenderItem is not suitable as a base class.
63 * Overriden delete operator.
64 * Deletes the RenderItem from its global memory pool
66 void operator delete( void* ptr );
69 * Reset the render-item.
74 * Retrieve the renderer.
75 * @return The renderer.
77 Render::Renderer& GetRenderer() const;
81 * @param[in] renderer The renderer
83 void SetRenderer( Render::Renderer* renderer );
87 * @param[in] node The node
89 void SetNode( Node* node );
95 const Node& GetNode() const
100 * Retrieve the modelView matrix.
101 * @return The modelView matrix.
103 Matrix& GetModelViewMatrix();
106 * Retrieve the modelView matrix.
107 * @return The modelView matrix.
109 const Matrix& GetModelViewMatrix() const;
112 * Retrieve the depth index
114 int GetDepthIndex() const
120 * Set the depth index
122 void SetDepthIndex( int depthIndex );
125 * Set if the RenderItem is opaque
126 * @param[in] isOpaque true if the RenderItem is opaque, false otherwise
128 void SetIsOpaque( bool isOpaque );
131 * Check if the RenderItem is opaque
132 * @return True if it is opaque, false otherwise
134 bool IsOpaque() const
140 * Sets the size of the render item
141 * @param[in] size The size of the render item
143 void SetSize( const Vector3& size)
149 * Retrives the size of the render item
150 * @return The size of the render item
152 const Vector3& GetSize() const
160 * Private constructor. See RenderItem::New
164 // RenderItems should not be copied as they are heavy
165 RenderItem( const RenderItem& item );
166 RenderItem& operator = ( const RenderItem& item );
168 Matrix mModelViewMatrix;
170 Render::Renderer* mRenderer;
176 } // namespace SceneGraph
178 } // namespace Internal
182 #endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__