1 #ifndef __DALI_TOOLKIT_INTERNAL_WATER_EFFECT_H__
2 #define __DALI_TOOLKIT_INTERNAL_WATER_EFFECT_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.
24 #include <dali/public-api/shader-effects/shader-effect.h>
27 #include <dali-toolkit/devel-api/shader-effects/water-effect.h>
39 * WaterEffect implementation class
41 class WaterEffect : public ShaderEffect::Extension
46 * @copydoc Dali::Toolkit::WaterEffect::WaterEffect
48 WaterEffect( unsigned int numberOfWaves );
51 * @copydoc Dali::Toolkit::WaterEffect::~WaterEffect
53 virtual ~WaterEffect();
56 * @copydoc Dali::Toolkit::WaterEffect::GetNumberOfWaves
58 unsigned int GetNumberOfWaves() const;
61 * @copydoc Dali::Toolkit::WaterEffect::CreateShaderEffect
63 static Dali::Toolkit::WaterEffect CreateShaderEffect( unsigned int numberOfWaves );
66 * @copydoc Dali::Toolkit::WaterEffect::SetAmplitude
68 void SetAmplitude( unsigned int index, float amplitude );
71 * @copydoc Dali::Toolkit::WaterEffect::SetCenter
73 void SetCenter( unsigned int index, const Vector2& center );
76 * @copydoc Dali::Toolkit::WaterEffect::SetPropagation
78 void SetPropagation( unsigned int index, float radius );
81 * @copydoc Dali::Toolkit::WaterEffect::GetPropagation
83 float GetPropagation( unsigned int index ) const;
86 * @copydoc Dali::Toolkit::WaterEffect::GetAmplitude
88 float GetAmplitude( unsigned int index ) const;
91 * @copydoc Dali::Toolkit::WaterEffect::GetCenter
93 Vector2 GetCenter( unsigned int index ) const;
96 * @copydoc Dali::Toolkit::WaterEffect::GetAmplitudePropertyName
98 std::string GetAmplitudePropertyName( unsigned int index ) const;
101 * @copydoc Dali::Toolkit::WaterEffect::GetCenterPropertyName
103 std::string GetCenterPropertyName( unsigned int index ) const;
106 * @copydoc Dali::Toolkit::WaterEffect::GetPropagationPropertyName
108 std::string GetPropagationPropertyName( unsigned int index ) const;
112 void Initialize( ShaderEffect shaderEffect );
116 ShaderEffect mShaderEffect;
118 unsigned int mNumberOfWaves;
123 // Undefined copy constructor.
124 WaterEffect( const WaterEffect& );
126 // Undefined assignment operator.
127 WaterEffect& operator=( const WaterEffect& );
131 } // namespace Internal
133 inline Internal::WaterEffect& GetImpl( Toolkit::WaterEffect& waterEffect )
135 return static_cast<Internal::WaterEffect&>( waterEffect.GetExtension() );
138 inline const Internal::WaterEffect& GetImpl( const Toolkit::WaterEffect& waterEffect )
140 return static_cast<const Internal::WaterEffect&>( waterEffect.GetExtension() );
143 } // namespace Toolkit
147 #endif // __DALI_TOOLKIT_INTERNAL_WATER_EFFECT_H__