Class Rotation
Definition
- Assembly:
- Tizen.NUI.dll
The Rotation class represents a rotation of a UI Component.
public class Rotation : Disposable, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceRotation()
The default constructor of Rotation class.
Declaration
public Rotation()
Rotation(Radian, Vector3)
The constructor from an axis and angle.
Declaration
public Rotation(Radian angle, Vector3 axis)
Parameters
| Type | Name | Description |
|---|---|---|
| Radian | angle | The angle around the axis. |
| Vector3 | axis | The vector of the axis. |
Properties
View SourceIDENTITY
The identity rotation, which represents no rotation. Actual value is (0.0f,0.0f,0.0f,1.0f).
Declaration
public static Rotation IDENTITY { get; }
Property Value
| Type | Description |
|---|---|
| Rotation |
Methods
View SourceAngleBetween(Rotation, Rotation)
Returns the shortest angle between two rotations in radians.
Declaration
public static float AngleBetween(Rotation q1, Rotation q2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | q1 | The first rotation. |
| Rotation | q2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| float | The angle between the two rotation. |
Conjugate()
Conjugates this rotation. This method computes the conjugate of the current rotation.
Declaration
public void Conjugate()
Dot(Rotation, Rotation)
Returns the dot product of two rotations.
Declaration
public static float Dot(Rotation q1, Rotation q2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | q1 | The first rotation. |
| Rotation | q2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| float | The dot product of the two rotations. |
Exp()
Performs an exponent.
Declaration
public Rotation Exp()
Returns
| Type | Description |
|---|---|
| Rotation | The rotation representing the exponent. |
GetAxisAngle(Vector3, Radian)
Converts the quaternion to an axis or angle pair.
Declaration
public bool GetAxisAngle(Vector3 axis, Radian angle)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | axis | The result of an axis. |
| Radian | angle | The result of angle in radians. |
Returns
| Type | Description |
|---|---|
| bool | True if converted correctly. |
Invert()
Inverts this rotation. This method computes the invert of the current rotation.
Declaration
public void Invert()
IsIdentity()
Helper to check if this is an identity quaternion.
Declaration
public bool IsIdentity()
Returns
| Type | Description |
|---|---|
| bool | True if this is identity quaternion. |
Length()
Returns the length of the rotation.
Declaration
public float Length()
Returns
| Type | Description |
|---|---|
| float | The length of the rotation. |
LengthSquared()
Returns the squared length of the rotation.
Declaration
public float LengthSquared()
Returns
| Type | Description |
|---|---|
| float | The squared length of the rotation. |
Lerp(Rotation, Rotation, float)
The linear interpolation (using a straight line between the two rotations).
Declaration
public static Rotation Lerp(Rotation q1, Rotation q2, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | q1 | The start rotation. |
| Rotation | q2 | The end rotation. |
| float | t | A progress value between 0 and 1. |
Returns
| Type | Description |
|---|---|
| Rotation | The interpolated rotation. |
Log()
Performs the logarithm of a rotation.
Declaration
public Rotation Log()
Returns
| Type | Description |
|---|---|
| Rotation | The rotation representing the logarithm. |
Normalize()
Normalizes this to unit length.
Declaration
public void Normalize()
Normalized()
Normalized.
Declaration
public Rotation Normalized()
Returns
| Type | Description |
|---|---|
| Rotation | A normalized version of this rotation. |
Slerp(Rotation, Rotation, float)
The spherical linear interpolation (using the shortest arc of a great circle between the two rotations).
Declaration
public static Rotation Slerp(Rotation q1, Rotation q2, float progress)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | q1 | The start rotation. |
| Rotation | q2 | The end rotation. |
| float | progress | A progress value between 0 and 1. |
Returns
| Type | Description |
|---|---|
| Rotation | The interpolated rotation. |
SlerpNoInvert(Rotation, Rotation, float)
This version of slerp, used by squad, does not check for theta > 90.
Declaration
public static Rotation SlerpNoInvert(Rotation q1, Rotation q2, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | q1 | The start rotation. |
| Rotation | q2 | The end rotation. |
| float | t | A progress value between 0 and 1. |
Returns
| Type | Description |
|---|---|
| Rotation | The interpolated rotation. |
Squad(Rotation, Rotation, Rotation, Rotation, float)
The spherical cubic interpolation.
Declaration
public static Rotation Squad(Rotation start, Rotation end, Rotation ctrl1, Rotation ctrl2, float t)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | start | The start rotation. |
| Rotation | end | The end rotation. |
| Rotation | ctrl1 | The control rotation for q1. |
| Rotation | ctrl2 | The control rotation for q2. |
| float | t | A progress value between 0 and 1. |
Returns
| Type | Description |
|---|---|
| Rotation | The interpolated rotation. |
Operators
View Sourceoperator +(Rotation, Rotation)
The addition operator.
Declaration
public static Rotation operator +(Rotation arg1, Rotation arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | The first rotation. |
| Rotation | arg2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of the addition. |
operator /(Rotation, float)
The scale operator.
Declaration
public static Rotation operator /(Rotation arg1, float arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | Rotation. |
| float | arg2 | A value to scale by. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of scaling. |
operator /(Rotation, Rotation)
The division operator.
Declaration
public static Rotation operator /(Rotation arg1, Rotation arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | The first rotation. |
| Rotation | arg2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of scaling. |
operator *(Rotation, float)
The scale operator.
Declaration
public static Rotation operator *(Rotation arg1, float arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | Rotation. |
| float | arg2 | A value to scale by. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of scaling. |
operator *(Rotation, Rotation)
The multiplication operator.
Declaration
public static Rotation operator *(Rotation arg1, Rotation arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | The first rotation. |
| Rotation | arg2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of the multiplication. |
operator *(Rotation, Vector3)
The multiplication operator.
Declaration
public static Vector3 operator *(Rotation arg1, Vector3 arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | Rotation. |
| Vector3 | arg2 | The vector to multiply. |
Returns
| Type | Description |
|---|---|
| Vector3 | The rotation containing the result of the multiplication. |
operator -(Rotation, Rotation)
The subtraction operator.
Declaration
public static Rotation operator -(Rotation arg1, Rotation arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | The first rotation. |
| Rotation | arg2 | The second rotation. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the result of the subtraction. |
operator -(Rotation)
The unary negation operator.
Declaration
public static Rotation operator -(Rotation arg1)
Parameters
| Type | Name | Description |
|---|---|---|
| Rotation | arg1 | The first rotation. |
Returns
| Type | Description |
|---|---|
| Rotation | The rotation containing the negated result. |