Merge "TextSelectionToolbar and Style Properties added" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / shader-effects / water-effect.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/devel-api/shader-effects/water-effect.h>
20
21 // INTERNAL INCLUDES
22 #include <dali-toolkit/internal/shader-effects/water-effect-impl.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 WaterEffect::WaterEffect()
31 {
32 }
33
34 // Call the Parent copy constructor to add reference to the implementation for this object
35 WaterEffect::WaterEffect( ShaderEffect handle, Internal::WaterEffect* shaderExtension )
36 : ShaderEffect( handle )
37 {
38   AttachExtension( shaderExtension );
39 }
40
41 WaterEffect::~WaterEffect()
42 {
43 }
44
45 WaterEffect WaterEffect::New( unsigned int numberOfWaves )
46 {
47   return Internal::WaterEffect::CreateShaderEffect( numberOfWaves );
48 }
49
50 unsigned int WaterEffect::GetNumberOfWaves() const
51 {
52   return GetImpl(*this).GetNumberOfWaves();
53 }
54
55 void WaterEffect::SetAmplitude( unsigned int index, float amplitude )
56 {
57   GetImpl(*this).SetAmplitude( index, amplitude );
58 }
59
60 void WaterEffect::SetCenter( unsigned int index, const Vector2& center )
61 {
62   GetImpl(*this).SetCenter( index, center );
63 }
64
65 void WaterEffect::SetPropagation( unsigned int index, float radius )
66 {
67   GetImpl(*this).SetPropagation( index, radius );
68 }
69
70 float WaterEffect::GetAmplitude( unsigned int index ) const
71 {
72   return GetImpl(*this).GetAmplitude( index );
73 }
74
75 Vector2 WaterEffect::GetCenter( unsigned int index ) const
76 {
77   return GetImpl(*this).GetCenter( index );
78 }
79
80 float WaterEffect::GetPropagation( unsigned int index ) const
81 {
82   return GetImpl(*this).GetPropagation( index );
83 }
84
85 std::string WaterEffect::GetAmplitudePropertyName( unsigned int index ) const
86 {
87   return GetImpl(*this).GetAmplitudePropertyName( index );
88 }
89
90 std::string WaterEffect::GetCenterPropertyName( unsigned int index ) const
91 {
92   return GetImpl(*this).GetCenterPropertyName( index );
93 }
94
95 std::string WaterEffect::GetPropagationPropertyName( unsigned int index ) const
96 {
97   return GetImpl(*this).GetPropagationPropertyName( index );
98 }
99
100 } // namespace Toolkit
101
102 } // namespace Dali