2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali-toolkit/public-api/shader-effects/water-effect.h>
22 #include <dali-toolkit/internal/shader-effects/water-effect-impl.h>
30 WaterEffect::WaterEffect()
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 )
38 AttachExtension( shaderExtension );
41 WaterEffect::~WaterEffect()
45 WaterEffect WaterEffect::New( unsigned int numberOfWaves )
47 return Internal::WaterEffect::CreateShaderEffect( numberOfWaves );
50 unsigned int WaterEffect::GetNumberOfWaves() const
52 return GetImpl(*this).GetNumberOfWaves();
55 void WaterEffect::SetAmplitude( unsigned int index, float amplitude )
57 GetImpl(*this).SetAmplitude( index, amplitude );
60 void WaterEffect::SetCenter( unsigned int index, const Vector2& center )
62 GetImpl(*this).SetCenter( index, center );
65 void WaterEffect::SetPropagation( unsigned int index, float radius )
67 GetImpl(*this).SetPropagation( index, radius );
70 float WaterEffect::GetAmplitude( unsigned int index ) const
72 return GetImpl(*this).GetAmplitude( index );
75 Vector2 WaterEffect::GetCenter( unsigned int index ) const
77 return GetImpl(*this).GetCenter( index );
80 float WaterEffect::GetPropagation( unsigned int index ) const
82 return GetImpl(*this).GetPropagation( index );
85 std::string WaterEffect::GetAmplitudePropertyName( unsigned int index ) const
87 return GetImpl(*this).GetAmplitudePropertyName( index );
90 std::string WaterEffect::GetCenterPropertyName( unsigned int index ) const
92 return GetImpl(*this).GetCenterPropertyName( index );
95 std::string WaterEffect::GetPropagationPropertyName( unsigned int index ) const
97 return GetImpl(*this).GetPropagationPropertyName( index );
100 } // namespace Toolkit