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