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 Flora License, Version 1.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://floralicense.org/license/
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.
25 #include <dali/dali.h>
26 #include <dali-toolkit/public-api/shader-effects/water-effect.h>
38 * WaterEffect implementation class
40 class WaterEffect : public ShaderEffect::Extension
45 * @copydoc Dali::Toolkit::WaterEffect::WaterEffect
47 WaterEffect( unsigned int numberOfWaves );
50 * @copydoc Dali::Toolkit::WaterEffect::~WaterEffect
52 virtual ~WaterEffect();
55 * @copydoc Dali::Toolkit::WaterEffect::GetNumberOfWaves
57 unsigned int GetNumberOfWaves() const;
60 * @copydoc Dali::Toolkit::WaterEffect::CreateShaderEffect
62 static Dali::Toolkit::WaterEffect CreateShaderEffect( unsigned int numberOfWaves );
65 * @copydoc Dali::Toolkit::WaterEffect::SetAmplitude
67 void SetAmplitude( unsigned int index, float amplitude );
70 * @copydoc Dali::Toolkit::WaterEffect::SetCenter
72 void SetCenter( unsigned int index, const Vector2& center );
75 * @copydoc Dali::Toolkit::WaterEffect::SetPropagation
77 void SetPropagation( unsigned int index, float radius );
80 * @copydoc Dali::Toolkit::WaterEffect::GetPropagation
82 float GetPropagation( unsigned int index ) const;
85 * @copydoc Dali::Toolkit::WaterEffect::GetAmplitude
87 float GetAmplitude( unsigned int index ) const;
90 * @copydoc Dali::Toolkit::WaterEffect::GetCenter
92 Vector2 GetCenter( unsigned int index ) const;
95 * @copydoc Dali::Toolkit::WaterEffect::GetAmplitudePropertyName
97 std::string GetAmplitudePropertyName( unsigned int index ) const;
100 * @copydoc Dali::Toolkit::WaterEffect::GetCenterPropertyName
102 std::string GetCenterPropertyName( unsigned int index ) const;
105 * @copydoc Dali::Toolkit::WaterEffect::GetPropagationPropertyName
107 std::string GetPropagationPropertyName( unsigned int index ) const;
111 void Initialize( ShaderEffect shaderEffect );
115 ShaderEffect mShaderEffect;
117 unsigned int mNumberOfWaves;
122 // Undefined copy constructor.
123 WaterEffect( const WaterEffect& );
125 // Undefined assignment operator.
126 WaterEffect& operator=( const WaterEffect& );
130 } // namespace Internal
132 inline Internal::WaterEffect& GetImpl( Toolkit::WaterEffect& waterEffect )
134 return static_cast<Internal::WaterEffect&>( waterEffect.GetExtension() );
137 inline const Internal::WaterEffect& GetImpl( const Toolkit::WaterEffect& waterEffect )
139 return static_cast<const Internal::WaterEffect&>( waterEffect.GetExtension() );
142 } // namespace Toolkit
146 #endif // __DALI_TOOLKIT_INTERNAL_WATER_EFFECT_H__