Add support for Animation::EndAction::BakeFinal to builder
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / shader-effects / water-effect.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 // CLASS HEADER
18 #include <dali-toolkit/public-api/shader-effects/water-effect.h>
19
20 // INTERNAL INCLUDES
21 #include <dali-toolkit/internal/shader-effects/water-effect-impl.h>
22
23 namespace Dali
24 {
25
26 namespace Toolkit
27 {
28
29 WaterEffect::WaterEffect()
30 {
31 }
32
33 // Call the Parent copy constructor to add reference to the implementation for this object
34 WaterEffect::WaterEffect( ShaderEffect handle, Internal::WaterEffect* shaderExtension )
35 : ShaderEffect( handle )
36 {
37   AttachExtension( shaderExtension );
38 }
39
40 WaterEffect::~WaterEffect()
41 {
42 }
43
44 WaterEffect WaterEffect::New( unsigned int numberOfWaves )
45 {
46   return Internal::WaterEffect::CreateShaderEffect( numberOfWaves );
47 }
48
49 unsigned int WaterEffect::GetNumberOfWaves() const
50 {
51   return GetImpl(*this).GetNumberOfWaves();
52 }
53
54 void WaterEffect::SetAmplitude( unsigned int index, float amplitude )
55 {
56   GetImpl(*this).SetAmplitude( index, amplitude );
57 }
58
59 void WaterEffect::SetCenter( unsigned int index, const Vector2& center )
60 {
61   GetImpl(*this).SetCenter( index, center );
62 }
63
64 void WaterEffect::SetPropagation( unsigned int index, float radius )
65 {
66   GetImpl(*this).SetPropagation( index, radius );
67 }
68
69 float WaterEffect::GetAmplitude( unsigned int index ) const
70 {
71   return GetImpl(*this).GetAmplitude( index );
72 }
73
74 Vector2 WaterEffect::GetCenter( unsigned int index ) const
75 {
76   return GetImpl(*this).GetCenter( index );
77 }
78
79 float WaterEffect::GetPropagation( unsigned int index ) const
80 {
81   return GetImpl(*this).GetPropagation( index );
82 }
83
84 std::string WaterEffect::GetAmplitudePropertyName( unsigned int index ) const
85 {
86   return GetImpl(*this).GetAmplitudePropertyName( index );
87 }
88
89 std::string WaterEffect::GetCenterPropertyName( unsigned int index ) const
90 {
91   return GetImpl(*this).GetCenterPropertyName( index );
92 }
93
94 std::string WaterEffect::GetPropagationPropertyName( unsigned int index ) const
95 {
96   return GetImpl(*this).GetPropagationPropertyName( index );
97 }
98
99 } // namespace Toolkit
100
101 } // namespace Dali