1 /*! \page animation-rotation Rotation with quaternions
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.
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.
12 * actor.SetRotation(Quaternion(Radian(Degree(45.0f)).value, Vector3::XAXIS)),
14 * Quaternion q(Radian(Degree(30.0f)).value, Vector3(1.0f, 1.0f, 0.0f));
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
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);
30 * mAnimation.RotateTo(mActor, q, AlphaFunctions::EaseInOut);