Wrapper class which unifies rotation handling of Quaternion, Euler or Z-only (used by 2D). Can store a Quaternion, Euler or Z-axis (for 2d rotation), and implicitly casts between those types.
More...
|
| Rotation (float z) |
|
| Rotation (Quaternion quaternion) |
|
| Rotation (Vector3 euler) |
|
|
static implicit | operator float (Rotation rotation) |
|
static implicit | operator Quaternion (Rotation rotation) |
|
static implicit | operator Rotation (float z) |
|
static implicit | operator Rotation (Quaternion quaternion) |
|
static implicit | operator Rotation (Vector3 euler) |
|
static implicit | operator Vector3 (Rotation rotation) |
|
|
readonly Vector3 | euler |
|
readonly Quaternion | quaternion |
|
readonly RotationTypes | Type |
| Indicates of the stored rotation is a Quaternion or Euler type. More...
|
|
readonly float | w |
|
readonly float | x |
|
readonly float | y |
|
readonly float | z |
|
|
Vector3 | AsEuler [get] |
| Returns the rotation as a Euler. If original type was Quaternion, that is converted to a Euler. More...
|
|
float | AsFloatZ [get] |
| Returns the z-axis value of the rotation. If original type was Quaternion, first converts to a Euler then returns the z value of that Euler. More...
|
|
Quaternion | AsQuaternion [get] |
| Returns the rotation as a Quaternion. If original type was a Euler or Rotation Z-axis only, that is converted to a Quaternion. More...
|
|
Wrapper class which unifies rotation handling of Quaternion, Euler or Z-only (used by 2D). Can store a Quaternion, Euler or Z-axis (for 2d rotation), and implicitly casts between those types.
◆ Type
readonly RotationTypes Type |
Indicates of the stored rotation is a Quaternion or Euler type.
◆ AsEuler
Returns the rotation as a Euler. If original type was Quaternion, that is converted to a Euler.
◆ AsFloatZ
Returns the z-axis value of the rotation. If original type was Quaternion, first converts to a Euler then returns the z value of that Euler.
◆ AsQuaternion
Returns the rotation as a Quaternion. If original type was a Euler or Rotation Z-axis only, that is converted to a Quaternion.