2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
18 #include <dali-toolkit/public-api/shader-effects/water-effect.h>
21 #include <dali-toolkit/internal/shader-effects/water-effect-impl.h>
29 WaterEffect::WaterEffect()
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 )
37 AttachExtension( shaderExtension );
40 WaterEffect::~WaterEffect()
44 WaterEffect WaterEffect::New( unsigned int numberOfWaves )
46 return Internal::WaterEffect::CreateShaderEffect( numberOfWaves );
49 unsigned int WaterEffect::GetNumberOfWaves() const
51 return GetImpl(*this).GetNumberOfWaves();
54 void WaterEffect::SetAmplitude( unsigned int index, float amplitude )
56 GetImpl(*this).SetAmplitude( index, amplitude );
59 void WaterEffect::SetCenter( unsigned int index, const Vector2& center )
61 GetImpl(*this).SetCenter( index, center );
64 void WaterEffect::SetPropagation( unsigned int index, float radius )
66 GetImpl(*this).SetPropagation( index, radius );
69 float WaterEffect::GetAmplitude( unsigned int index ) const
71 return GetImpl(*this).GetAmplitude( index );
74 Vector2 WaterEffect::GetCenter( unsigned int index ) const
76 return GetImpl(*this).GetCenter( index );
79 float WaterEffect::GetPropagation( unsigned int index ) const
81 return GetImpl(*this).GetPropagation( index );
84 std::string WaterEffect::GetAmplitudePropertyName( unsigned int index ) const
86 return GetImpl(*this).GetAmplitudePropertyName( index );
89 std::string WaterEffect::GetCenterPropertyName( unsigned int index ) const
91 return GetImpl(*this).GetCenterPropertyName( index );
94 std::string WaterEffect::GetPropagationPropertyName( unsigned int index ) const
96 return GetImpl(*this).GetPropagationPropertyName( index );
99 } // namespace Toolkit