1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_DOUBLE_BUFFERED_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_DOUBLE_BUFFERED_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/math/matrix.h>
23 #include <dali/public-api/math/quaternion.h>
24 #include <dali/public-api/math/vector3.h>
32 // The number of buffers per scene-graph property
33 static const unsigned int NUM_SCENE_GRAPH_BUFFERS = 2;
35 // Buffer index used when reading off-stage values
36 static const unsigned int ARBITRARY_OFF_STAGE_BUFFER = 0;
42 * Templated class for a double-buffered value.
55 DoubleBuffered(const T& val)
61 inline T& operator[](const size_t i)
63 DALI_ASSERT_DEBUG(i < NUM_SCENE_GRAPH_BUFFERS);
68 inline const T& operator[](const size_t i) const
70 DALI_ASSERT_DEBUG(i < NUM_SCENE_GRAPH_BUFFERS);
78 DoubleBuffered<T>(const DoubleBuffered<T>&);
81 DoubleBuffered<T>& operator=(const DoubleBuffered<T>& rhs);
89 } // namespace SceneGraph
91 } // namespace Internal
95 #endif // __DALI_INTERNAL_SCENE_GRAPH_DOUBLE_BUFFERED_H__