Merge remote-tracking branch 'origin/tizen' into devel/new_mesh
[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 namespace Dali
22 {
23 struct Vector4;
24 class Matrix;
25
26 namespace Internal
27 {
28 namespace SceneGraph
29 {
30
31 /**
32  * An interface to provide data for a Renderer
33  */
34 class NodeDataProvider
35 {
36 public:
37
38   /**
39    * Constructor. Nothing to do as a pure interface.
40    */
41   NodeDataProvider() { }
42
43   /**
44    * @param bufferId to use
45    * @return a reference to the model matrix
46    */
47   virtual const Matrix& GetModelMatrix( unsigned int bufferId ) = 0;
48
49   /**
50    * @param bufferId to use
51    * @return a reference to the color
52    */
53   virtual const Vector4& GetRenderColor( unsigned int bufferId ) = 0;
54
55   /**
56    * @param[in] bufferIndex The buffer index to use
57    * @return the actor size
58    */
59   virtual const Vector3& GetRenderSize( unsigned int bufferIndex ) = 0;
60
61 protected:
62   /**
63    * Virtual destructor, this is an interface, no deletion through this interface
64    */
65   virtual ~NodeDataProvider() { }
66 };
67
68 } // SceneGraph
69 } // Internal
70 } // Dali
71
72 #endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_DATA_PROVIDER_H__