Merge "Allow multiple renderers per Actor and sharing renderers between actors" into...
[platform/core/uifw/dali-core.git] / dali / internal / render / data-providers / node-data-provider.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__
3
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
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
21 #include <dali/internal/render/data-providers/uniform-map-data-provider.h>
22
23 namespace Dali
24 {
25 struct Vector4;
26 class Matrix;
27
28 namespace Internal
29 {
30 namespace SceneGraph
31 {
32
33 /**
34  * An interface to provide data for a Renderer
35  */
36 class NodeDataProvider : UniformMapDataProvider
37 {
38 public:
39
40   /**
41    * Constructor. Nothing to do as a pure interface.
42    */
43   NodeDataProvider() { }
44
45   /**
46    * @param bufferId to use
47    * @return a reference to the model matrix
48    */
49   virtual const Matrix& GetModelMatrix( unsigned int bufferId ) const = 0;
50
51   /**
52    * @param bufferId to use
53    * @return a reference to the color
54    */
55   virtual const Vector4& GetRenderColor( unsigned int bufferId ) const = 0;
56
57   /**
58    * @param[in] bufferIndex The buffer index to use
59    * @return the actor size
60    */
61   virtual const Vector3& GetRenderSize( unsigned int bufferIndex ) const = 0;
62
63   /**
64    * @copydoc Dali::Internal::SceneGraph::UniformMapDataProvider::GetUniformMapChanged()
65    */
66   virtual bool GetUniformMapChanged( BufferIndex bufferIndex ) const = 0;
67
68   /**
69    * @copydoc Dali::Internal::SceneGraph::UniformMapDataProvider::GetUniformMap()
70    */
71   virtual const CollectedUniformMap& GetUniformMap( BufferIndex bufferIndex ) const = 0;
72
73 protected:
74   /**
75    * Virtual destructor, this is an interface, no deletion through this interface
76    */
77   virtual ~NodeDataProvider() { }
78 };
79
80 } // SceneGraph
81 } // Internal
82 } // Dali
83
84 #endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__