644cfb52aff342738ec46f08c161409683bb8fcb
[platform/core/uifw/dali-core.git] / dali / public-api / animation / animation.h
1 #ifndef DALI_ANIMATION_H
2 #define DALI_ANIMATION_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <cstdint> // uint32_t
23
24 // INTERNAL INCLUDES
25 #include <dali/public-api/animation/alpha-function.h>
26 #include <dali/public-api/animation/key-frames.h>
27 #include <dali/public-api/animation/path.h>
28 #include <dali/public-api/animation/time-period.h>
29 #include <dali/public-api/object/any.h>
30 #include <dali/public-api/object/handle.h>
31 #include <dali/public-api/object/property.h>
32 #include <dali/public-api/signals/dali-signal.h>
33
34 namespace Dali
35 {
36 /**
37  * @addtogroup dali_core_animation
38  * @{
39  */
40
41 class Actor;
42 struct Property;
43 struct Vector2;
44 struct Vector3;
45
46 namespace Internal DALI_INTERNAL
47 {
48 class Animation;
49 }
50
51 /**
52  * @brief Dali::Animation can be used to animate the properties of any number of objects, typically Actors.
53  *
54  * An example animation setup is shown below:
55  *
56  * @code
57  *
58  * struct MyProgram
59  * {
60  *   Actor mActor; // The object we wish to animate
61  *   Animation mAnimation; // Keep this to control the animation
62  * }
63  *
64  * // ...To play the animation
65  *
66  * mAnimation = Animation::New(3.0f); // duration 3 seconds
67  * mAnimation.AnimateTo(Property(mActor, Actor::Property::POSITION), Vector3(10.0f, 50.0f, 0.0f));
68  * mAnimation.Play();
69  *
70  * @endcode
71  *
72  * Dali::Animation supports "fire and forget" behaviour i.e. an animation continues to play if the handle is discarded.
73  * Note that in the following example, the "Finish" signal will be emitted:
74  *
75  * @code
76  *
77  * void ExampleCallback( Animation& source )
78  * {
79  *   std::cout << "Animation has finished" << std::endl;
80  * }
81  *
82  * void ExampleAnimation( Actor actor )
83  * {
84  *   Animation animation = Animation::New(2.0f); // duration 2 seconds
85  *   animation.AnimateTo(Property(actor, Actor::Property::POSITION), 10.0f, 50.0f, 0.0f);
86  *   animation.FinishedSignal().Connect( ExampleCallback );
87  *   animation.Play();
88  * } // At this point the animation handle has gone out of scope
89  *
90  * Actor actor = Actor::New();
91  * Stage::GetCurrent().Add( actor );
92  *
93  * // Fire animation and forget about it
94  * ExampleAnimation( actor );
95  *
96  * // However the animation will continue, and "Animation has finished" will be printed after 2 seconds.
97  *
98  * @endcode
99  *
100  * If the "Finish" signal is connected to a member function of an object, it must be disconnected before the object is destroyed.
101  * This is typically done in the object destructor, and requires either the Dali::Connection object or Dali::Animation handle to be stored.
102  *
103  * The overall animation time is superseded by the values given in the TimePeriod structure used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and Animate() methods.
104  * If any of the individual calls to those functions exceeds the overall animation time, then the overall animation time is automatically extended.
105  *
106  * Using AnimateTo and AnimateBy for the same property of the same Actor will yield undefined behaviour especially if the TimePeriod overlaps.
107  *
108  * After calling Animation::Play(), Handle::GetProperty will return the target value of the animated property.
109  *
110  * Signals
111  * | %Signal Name | Method                   |
112  * |--------------|--------------------------|
113  * | finished     | @ref FinishedSignal()    |
114  *
115  * Actions
116  * | %Action Name | %Animation method called |
117  * |--------------|--------------------------|
118  * | play         | Play()                   |
119  * | stop         | Stop()                   |
120  * | pause        | Pause()                  |
121  * @SINCE_1_0.0
122  */
123 class DALI_CORE_API Animation : public BaseHandle
124 {
125 public:
126
127   typedef Signal< void (Animation&) > AnimationSignalType; ///< Animation finished signal type @SINCE_1_0.0
128
129   typedef Any AnyFunction; ///< Interpolation function @SINCE_1_0.0
130
131   /**
132    * @brief Enumeration for what to do when the animation ends, is stopped, or is destroyed.
133    * @SINCE_1_0.0
134    */
135   enum EndAction
136   {
137     BAKE,     ///< When the animation ends, the animated property values are saved. @SINCE_1_0.0
138     DISCARD,  ///< When the animation ends, the animated property values are forgotten. @SINCE_1_0.0
139     BAKE_FINAL ///< If the animation is stopped, the animated property values are saved as if the animation had run to completion, otherwise behaves like Bake. @SINCE_1_0.0
140   };
141
142   /**
143    * @brief Enumeration for what interpolation method to use on key-frame animations.
144    * @SINCE_1_0.0
145    */
146   enum Interpolation
147   {
148     LINEAR,   ///< Values in between key frames are interpolated using a linear polynomial. (Default) @SINCE_1_0.0
149     CUBIC     ///< Values in between key frames are interpolated using a cubic polynomial. @SINCE_1_0.0
150   };
151
152   /**
153    * @brief Enumeration for what state the animation is in.
154    *
155    * Note: Calling Reset() on this class will NOT reset the animation. It will call BaseHandle::Reset() which drops the object handle.
156    *
157    * @SINCE_1_1.21
158    */
159   enum State
160   {
161     STOPPED,   ///< Animation has stopped @SINCE_1_1.21
162     PLAYING,   ///< The animation is playing @SINCE_1_1.21
163     PAUSED     ///< The animation is paused @SINCE_1_1.21
164   };
165
166   /**
167    * @brief Enumeration for what looping mode is in.
168    *
169    * @SINCE_1_2.60
170    */
171   enum LoopingMode
172   {
173     RESTART,      ///< When the animation arrives at the end in looping mode, the animation restarts from the beginning. @SINCE_1_2.60
174     AUTO_REVERSE  ///< When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again. @SINCE_1_2.60
175   };
176
177   /**
178    * @brief Creates an uninitialized Animation; this can be initialized with Animation::New().
179    *
180    * Calling member functions with an uninitialized Animation handle is not allowed.
181    * @SINCE_1_0.0
182    */
183   Animation();
184
185   /**
186    * @brief Creates an initialized Animation.
187    *
188    * The animation will not loop.
189    * The default end action is "Bake".
190    * The default alpha function is linear.
191    * @SINCE_1_0.0
192    * @param[in] durationSeconds The duration in seconds
193    * @return A handle to a newly allocated Dali resource
194    * @note durationSeconds can not be negative.
195    */
196   static Animation New(float durationSeconds);
197
198   /**
199    * @brief Downcasts a handle to Animation handle.
200    *
201    * If handle points to an Animation object, the downcast produces valid handle.
202    * If not, the returned handle is left uninitialized.
203    *
204    * @SINCE_1_0.0
205    * @param[in] handle Handle to an object
206    * @return Handle to an Animation object or an uninitialized handle
207    */
208   static Animation DownCast( BaseHandle handle );
209
210   /**
211    * @brief Destructor.
212    *
213    * This is non-virtual since derived Handle types must not contain data or virtual methods.
214    * @SINCE_1_0.0
215    */
216   ~Animation();
217
218   /**
219    * @brief This copy constructor is required for (smart) pointer semantics.
220    *
221    * @SINCE_1_0.0
222    * @param[in] handle A reference to the copied handle
223    */
224   Animation(const Animation& handle);
225
226   /**
227    * @brief This assignment operator is required for (smart) pointer semantics.
228    *
229    * @SINCE_1_0.0
230    * @param[in] rhs A reference to the copied handle
231    * @return A reference to this
232    */
233   Animation& operator=(const Animation& rhs);
234
235   /**
236    * @brief Move constructor.
237    *
238    * @SINCE_1_9.22
239    * @param[in] rhs A reference to the moved handle
240    */
241   Animation( Animation&& rhs );
242
243   /**
244    * @brief Move assignment operator.
245    *
246    * @SINCE_1_9.22
247    * @param[in] rhs A reference to the moved handle
248    * @return A reference to this handle
249    */
250   Animation& operator=( Animation&& rhs );
251
252   /**
253    * @brief Sets the duration of an animation.
254    *
255    * @SINCE_1_0.0
256    * @param[in] seconds The duration in seconds
257    * @pre DurationSeconds must be greater than zero.
258    */
259   void SetDuration(float seconds);
260
261   /**
262    * @brief Retrieves the duration of an animation.
263    *
264    * @SINCE_1_0.0
265    * @return The duration in seconds
266    */
267   float GetDuration() const;
268
269   /**
270    * @brief Sets whether the animation will loop.
271    *
272    * This function resets the loop count and should not be used with SetLoopCount(int).
273    * Setting this parameter does not cause the animation to Play().
274    *
275    * @SINCE_1_0.0
276    * @param[in] looping True if the animation will loop
277    */
278   void SetLooping(bool looping);
279
280   /**
281    * @brief Enables looping for 'count' repeats.
282    *
283    * A zero is the same as SetLooping(true) i.e. repeat forever.
284    * This function resets the looping value and should not be used with SetLooping(bool).
285    * Setting this parameter does not cause the animation to Play().
286    *
287    * @SINCE_1_1.20
288    * @param[in] count The number of times to loop
289    */
290   void SetLoopCount(int32_t  count);
291
292   /**
293    * @brief Gets the loop count.
294    *
295    * A zero is the same as SetLooping(true) ie repeat forever.
296    * The loop count is initially 1 for play once.
297    *
298    * @SINCE_1_1.20
299    * @return The number of times to loop
300    */
301   int32_t  GetLoopCount();
302
303   /**
304    * @brief Gets the current loop count.
305    *
306    * A value 0 to GetLoopCount() indicating the current loop count when looping.
307    *
308    * @SINCE_1_1.20
309    * @return The current number of loops that have occured
310    */
311   int32_t  GetCurrentLoop();
312
313   /**
314    * @brief Queries whether the animation will loop.
315    *
316    * @SINCE_1_0.0
317    * @return True if the animation will loop
318    */
319   bool IsLooping() const;
320
321   /**
322    * @brief Sets the end action of the animation.
323    *
324    * This action is performed when the animation ends or if it is stopped.
325    * Default end action is bake.
326    * @SINCE_1_0.0
327    * @param[in] action The end action
328    */
329   void SetEndAction(EndAction action);
330
331   /**
332    * @brief Returns the end action of the animation.
333    *
334    * @SINCE_1_0.0
335    * @return The end action
336    */
337   EndAction GetEndAction() const;
338
339   /**
340    * @brief Sets the disconnect action.
341    *
342    * If any of the animated property owners are disconnected from the stage while the animation is being played, then this action is performed.
343    * Default action is to BakeFinal.
344    * @SINCE_1_0.0
345    * @param[in] disconnectAction The disconnect action
346    */
347   void SetDisconnectAction( EndAction disconnectAction );
348
349   /**
350    * @brief Returns the disconnect action.
351    *
352    * @SINCE_1_0.0
353    * @return The disconnect action
354    */
355   EndAction GetDisconnectAction() const;
356
357   /**
358    * @brief Sets the default alpha function for an animation.
359    *
360    * This is applied to individual property animations, if no further alpha functions are supplied.
361    * @SINCE_1_0.0
362    * @param[in] alpha The default alpha function
363    */
364   void SetDefaultAlphaFunction(AlphaFunction alpha);
365
366   /**
367    * @brief Retrieves the default alpha function for an animation.
368    *
369    * @SINCE_1_0.0
370    * @return The default alpha function
371    */
372   AlphaFunction GetDefaultAlphaFunction() const;
373
374   /**
375    * @brief Sets the progress of the animation.
376    *
377    * The animation will play (or continue playing) from this point. The progress
378    * must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
379    * otherwise, it will be ignored.
380    *
381    * @SINCE_1_0.0
382    * @param[in] progress The new progress as a normalized value between [0,1]
383    * or between the play range if specified
384    */
385   void SetCurrentProgress( float progress );
386
387   /**
388   * @brief Retrieves the current progress of the animation.
389   *
390   * @SINCE_1_0.0
391   * @return The current progress as a normalized value between [0,1]
392   */
393   float GetCurrentProgress();
394
395   /**
396    * @brief Specifies a speed factor for the animation.
397    *
398    * The speed factor is a multiplier of the normal velocity of the animation. Values between [0,1] will
399    * slow down the animation and values above one will speed up the animation. It is also possible to specify a negative multiplier
400    * to play the animation in reverse.
401    *
402    * @SINCE_1_0.0
403    * @param[in] factor A value which will multiply the velocity
404    */
405   void SetSpeedFactor( float factor );
406
407   /**
408    * @brief Retrieves the speed factor of the animation.
409    *
410    * @SINCE_1_0.0
411    * @return Speed factor
412    */
413   float GetSpeedFactor() const;
414
415   /**
416    * @brief Sets the playing range.
417    *
418    * Animation will play between the values specified. Both values ( range.x and range.y ) should be between 0-1,
419    * otherwise they will be ignored. If the range provided is not in proper order ( minimum,maximum ), it will be reordered.
420    *
421    * @SINCE_1_0.0
422    * @param[in] range Two values between [0,1] to specify minimum and maximum progress. The
423    * animation will play between those values
424    */
425   void SetPlayRange( const Vector2& range );
426
427   /**
428    * @brief Gets the playing range.
429    *
430    * @SINCE_1_0.0
431    * @return The play range defined for the animation
432    */
433   Vector2 GetPlayRange() const;
434
435   /**
436    * @brief Play the animation.
437    * @SINCE_1_0.0
438    */
439   void Play();
440
441   /**
442    * @brief Plays the animation from a given point.
443    *
444    * The progress must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
445    * otherwise, it will be ignored.
446    *
447    * @SINCE_1_0.0
448    * @param[in] progress A value between [0,1], or between the play range if specified, from where the animation should start playing
449    */
450   void PlayFrom( float progress );
451
452   /**
453    * @brief Play the animation after a given delay time.
454    *
455    * The delay time is not included in the looping time.
456    * When the delay time is negative value, it would treat as play immediately.
457    * @SINCE_1_2.60
458    * @param[in] delaySeconds The delay time
459    */
460   void PlayAfter( float delaySeconds );
461
462   /**
463    * @brief Pauses the animation.
464    * @SINCE_1_0.0
465    */
466   void Pause();
467
468   /**
469    * @brief Queries the state of the animation.
470    * @SINCE_1_1.21
471    * @return The Animation::State
472    */
473   State GetState() const;
474
475   /**
476    * @brief Stops the animation.
477    * @SINCE_1_0.0
478    */
479   void Stop();
480
481   /**
482    * @brief Clears the animation.
483    *
484    * This disconnects any objects that were being animated, effectively stopping the animation.
485    * @SINCE_1_0.0
486    */
487   void Clear();
488
489   /**
490    * @brief Sets the looping mode.
491    *
492    * Animation plays forwards and then restarts from the beginning or runs backwards again.
493    * @SINCE_1_2.60
494    * @param[in] loopingMode The looping mode is one of RESTART and AUTO_REVERSE
495    */
496   void SetLoopingMode( LoopingMode loopingMode );
497
498   /**
499    * @brief Gets one of the current looping mode.
500    *
501    * @SINCE_1_2.60
502    * @return The current looping mode
503    */
504   LoopingMode GetLoopingMode() const;
505
506   /**
507    * @brief Connects to this signal to be notified when an Animation's animations have finished.
508    *
509    * @SINCE_1_0.0
510    * @return A signal object to connect with
511    */
512   AnimationSignalType& FinishedSignal();
513
514   /**
515    * @brief Animates a property value by a relative amount.
516    *
517    * The default alpha function will be used.
518    * The effect will start & end when the animation begins & ends.
519    * @SINCE_1_0.0
520    * @param[in] target The target object/property to animate
521    * @param[in] relativeValue The property value will change by this amount
522    */
523   void AnimateBy(Property target, Property::Value relativeValue);
524
525   /**
526    * @brief Animates a property value by a relative amount.
527    *
528    * The effect will start & end when the animation begins & ends.
529    * @SINCE_1_0.0
530    * @param[in] target The target object/property to animate
531    * @param[in] relativeValue The property value will change by this amount
532    * @param[in] alpha The alpha function to apply
533    */
534   void AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha);
535
536   /**
537    * @brief Animates a property value by a relative amount.
538    *
539    * The default alpha function will be used.
540    * @SINCE_1_0.0
541    * @param[in] target The target object/property to animate
542    * @param[in] relativeValue The property value will increase/decrease by this amount
543    * @param[in] period The effect will occur during this time period
544    */
545   void AnimateBy(Property target, Property::Value relativeValue, TimePeriod period);
546
547   /**
548    * @brief Animates a property value by a relative amount.
549    *
550    * @SINCE_1_0.0
551    * @param[in] target The target object/property to animate
552    * @param[in] relativeValue The property value will increase/decrease by this amount
553    * @param[in] alpha The alpha function to apply
554    * @param[in] period The effect will occur during this time period
555    */
556   void AnimateBy(Property target, Property::Value relativeValue, AlphaFunction alpha, TimePeriod period);
557
558   /**
559    * @brief Animates a property to a destination value.
560    *
561    * The default alpha function will be used.
562    * The effect will start & end when the animation begins & ends.
563    * @SINCE_1_0.0
564    * @param[in] target The target object/property to animate
565    * @param[in] destinationValue The destination value
566    */
567   void AnimateTo(Property target, Property::Value destinationValue);
568
569   /**
570    * @brief Animates a property to a destination value.
571    *
572    * The effect will start & end when the animation begins & ends.
573    * @SINCE_1_0.0
574    * @param[in] target The target object/property to animate
575    * @param[in] destinationValue The destination value
576    * @param[in] alpha The alpha function to apply
577    */
578   void AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha);
579
580   /**
581    * @brief Animates a property to a destination value.
582    *
583    * The default alpha function will be used.
584    * @SINCE_1_0.0
585    * @param[in] target The target object/property to animate
586    * @param[in] destinationValue The destination value
587    * @param[in] period The effect will occur during this time period
588    */
589   void AnimateTo(Property target, Property::Value destinationValue, TimePeriod period);
590
591   /**
592    * @brief Animates a property to a destination value.
593    *
594    * @SINCE_1_0.0
595    * @param[in] target The target object/property to animate
596    * @param[in] destinationValue The destination value
597    * @param[in] alpha The alpha function to apply
598    * @param[in] period The effect will occur during this time period
599    */
600   void AnimateTo(Property target, Property::Value destinationValue, AlphaFunction alpha, TimePeriod period);
601
602    /**
603    * @brief Animates a property between keyframes.
604    *
605    * @SINCE_1_0.0
606    * @param[in] target The target object property to animate
607    * @param[in] keyFrames The set of time/value pairs between which to animate
608    */
609   void AnimateBetween(Property target, KeyFrames& keyFrames);
610
611   /**
612    * @brief Animates a property between keyframes.
613    *
614    * @SINCE_1_0.0
615    * @param[in] target The target object property to animate
616    * @param[in] keyFrames The set of time/value pairs between which to animate
617    * @param[in] interpolation The method used to interpolate between values
618    */
619   void AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation);
620
621   /**
622    * @brief Animates a property between keyframes.
623    *
624    * @SINCE_1_0.0
625    * @param[in] target The target object property to animate
626    * @param[in] keyFrames The set of time/value pairs between which to animate
627    * @param[in] alpha The alpha function to apply
628    */
629   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha);
630
631   /**
632    * @brief Animates a property between keyframes.
633    *
634    * @SINCE_1_0.0
635    * @param[in] target The target object property to animate
636    * @param[in] keyFrames The set of time/value pairs between which to animate
637    * @param[in] alpha The alpha function to apply
638    * @param[in] interpolation The method used to interpolate between values
639    */
640   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, Interpolation interpolation);
641
642   /**
643    * @brief Animates a property between keyframes.
644    *
645    * @SINCE_1_0.0
646    * @param[in] target The target object property to animate
647    * @param[in] keyFrames The set of time/value pairs between which to animate
648    * @param[in] period The effect will occur during this time period
649    */
650   void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period);
651
652   /**
653    * @brief Animates a property between keyframes.
654    *
655    * @SINCE_1_0.0
656    * @param[in] target The target object property to animate
657    * @param[in] keyFrames The set of time/value pairs between which to animate
658    * @param[in] period The effect will occur during this time period
659    * @param[in] interpolation The method used to interpolate between values
660    */
661   void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period, Interpolation interpolation);
662
663   /**
664    * @brief Animates a property between keyframes.
665    *
666    * @SINCE_1_0.0
667    * @param[in] target The target object property to animate
668    * @param[in] keyFrames The set of time/value pairs between which to animate
669    * @param[in] alpha The alpha function to apply
670    * @param[in] period The effect will occur during this time period
671    */
672   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period);
673
674   /**
675    * @brief Animates a property between keyframes.
676    *
677    * @SINCE_1_0.0
678    * @param[in] target The target object property to animate
679    * @param[in] keyFrames The set of time/value pairs between which to animate
680    * @param[in] alpha The alpha function to apply to the overall progress
681    * @param[in] period The effect will occur during this time period
682    * @param[in] interpolation The method used to interpolate between values
683    */
684   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation);
685
686
687   // Actor-specific convenience methods
688
689   /**
690    * @brief Animates an actor's position and orientation through a predefined path.
691    *
692    * The actor will rotate to orient the supplied
693    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
694    *
695    * @SINCE_1_0.0
696    * @param[in] actor The actor to animate
697    * @param[in] path The path. It defines position and orientation
698    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
699    */
700   void Animate( Actor actor, Path path, const Vector3& forward );
701
702   /**
703    * @brief Animates an actor's position and orientation through a predefined path.
704    *
705    * The actor will rotate to orient the supplied
706    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
707    *
708    * @SINCE_1_0.0
709    * @param[in] actor The actor to animate
710    * @param[in] path The path. It defines position and orientation
711    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
712    * @param[in] alpha The alpha function to apply
713    */
714   void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha );
715
716   /**
717    * @brief Animates an actor's position and orientation through a predefined path.
718    *
719    * The actor will rotate to orient the supplied
720    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
721    *
722    * @SINCE_1_0.0
723    * @param[in] actor The actor to animate
724    * @param[in] path The path. It defines position and orientation
725    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
726    * @param[in] period The effect will occur during this time period
727    */
728   void Animate( Actor actor, Path path, const Vector3& forward, TimePeriod period );
729
730   /**
731    * @brief Animates an actor's position and orientation through a predefined path.
732    *
733    * The actor will rotate to orient the supplied
734    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
735    *
736    * @SINCE_1_0.0
737    * @param[in] actor The actor to animate
738    * @param[in] path The path. It defines position and orientation
739    * @param[in] forward The vector (in local space coordinate system) that will be oriented with the path's tangent direction
740    * @param[in] alpha The alpha function to apply
741    * @param[in] period The effect will occur during this time period
742    */
743   void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha, TimePeriod period);
744
745   /**
746    * @brief Shows an actor during the animation.
747    *
748    * @SINCE_1_0.0
749    * @param[in] actor The actor to animate
750    * @param[in] delaySeconds The initial delay from the start of the animation
751    */
752   void Show(Actor actor, float delaySeconds);
753
754   /**
755    * @brief Hides an actor during the animation.
756    *
757    * @SINCE_1_0.0
758    * @param[in] actor The actor to animate
759    * @param[in] delaySeconds The initial delay from the start of the animation
760    */
761   void Hide(Actor actor, float delaySeconds);
762
763 public: // Not intended for use by Application developers
764
765   /// @cond internal
766   /**
767    * @brief This constructor is used by Animation::New() methods.
768    * @SINCE_1_0.0
769    * @param[in] animation A pointer to a newly allocated Dali resource
770    */
771   explicit DALI_INTERNAL Animation(Internal::Animation* animation);
772   /// @endcond
773
774 };
775
776 /**
777  * @}
778  */
779 } // namespace Dali
780
781 #endif // DALI_ANIMATION_H