Wrapper class which unifies rotation handling of Quaternion, Euler or Zonly (used by 2D). Can store a Quaternion, Euler or Zaxis (for 2d rotation), and implicitly casts between those types.
More...

 Rotation (Quaternion quaternion) 

 Rotation (Vector3 euler) 

 Rotation (float z) 


static implicit  operator Quaternion (Rotation rotation) 

static implicit  operator Vector3 (Rotation rotation) 

static implicit  operator float (Rotation rotation) 

static implicit  operator Rotation (Quaternion quaternion) 

static implicit  operator Rotation (Vector3 euler) 

static implicit  operator Rotation (float z) 


readonly RotationTypes  Type 
 Indicates of the stored rotation is a Quaternion or Euler type. More...


readonly Quaternion  quaternion 

readonly Vector3  euler 

readonly float  x 

readonly float  y 

readonly float  z 

readonly float  w 


Quaternion  AsQuaternion [get] 
 Returns the rotation as a Quaternion. If original type was a Euler or Rotation Zaxis only, that is converted to a Quaternion. More...


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 zaxis value of the rotation. If original type was Quaternion, first converts to a Euler then returns the z value of that Euler. More...


Wrapper class which unifies rotation handling of Quaternion, Euler or Zonly (used by 2D). Can store a Quaternion, Euler or Zaxis (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 zaxis 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 Zaxis only, that is converted to a Quaternion.