Basic IMF->KeyEvent and scrolling support
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / animation-rotation.h
1 /*! \page animation-rotation Rotation with quaternions
2  *
3  * \ref Dali::Quaternion "Quaternions" are used to specify unique orientations on actors. They are also
4  * very useful for calculating smooth transitions between orientations.
5  *
6  * The Dali::Actor class provides the ability to set the orientation
7  * by both angle+axis and quaternion. It also allows you to rotate the
8  * actor around another quaternion.
9  *
10  * @code
11  * Dali::Actor actor;
12  * actor.SetRotation(Quaternion(Radian(Degree(45.0f)).value, Vector3::XAXIS)),
13  *
14  * Quaternion q(Radian(Degree(30.0f)).value, Vector3(1.0f, 1.0f, 0.0f));
15  * actor.RotateBy(q);
16  * @endcode
17  *
18  * The Dali::Animation class provides several RotateTo methods that
19  * use \ref Dali::Quaternion "Quaternions" directly.  The other
20  * RotateTo methods are specified using Axis+Angle, and these convert
21  * to Quaternion internally. You will only need to use the quaternion
22  * based methods when you are doing something more complex than
23  * initialising with Axis+Angle, such as applying several rotations
24  * together.
25  * @code
26  * mAnimation = Animation::New(5.0f); // 5 seconds
27  * Quaternion q(Radian(Degree(45.0f)).value, Vector3::YAXIS);
28  * Quaternion r(Radian(Degree(30.0f)).value, Vector3::ZAXIS);
29  * q *= r;
30  * mAnimation.RotateTo(mActor, q, AlphaFunctions::EaseInOut);
31  * mAnimation.Play();
32  * @endcode
33  */