Euler (struct)¶
The Euler type represents a 3D rotation as Euler X, Y, and Z angles and a RotationOrder. The X, Y, and Z angles are expressed in radians. The Euler type also provides conversion methods to Mat33.
参考
/*
** Example: Construct Euler
*/
RotationOrder ro('xyz');
Euler euler(0.0, PI, 0.0, ro);
Mat33 matrix = euler.toMat33();
Members¶
Scalar | x | |
Scalar | y | |
Scalar | z | |
RotationOrder | ro |
Methods¶
Euler ( in Euler other ) | |
Euler ( in Scalar x, in Scalar y, in Scalar z ) | |
Euler ( in Scalar x, in Scalar y, in Scalar z, in RotationOrder order ) | |
Euler ( in Vec3 angles ) | |
Euler ( in Vec3 angles, in RotationOrder order ) | |
Euler () | |
Boolean | almostEqual ? ( in Euler other, in Scalar precision ) |
Euler | clone ? () |
Boolean | equal ? ( in Euler other ) |
Vec3 | getAngles ? () |
UInt32 | hash ? () |
set ! ( in Scalar x, in Scalar y, in Scalar z ) | |
set ! ( in Scalar x, in Scalar y, in Scalar z, in RotationOrder order ) | |
set ! ( in Vec3 angles ) | |
set ! ( in Vec3 angles, in RotationOrder order ) | |
setAngles ! ( in Vec3 angles ) | |
Mat33 | toMat33 ? () |
Methods in detail¶
copy constructor
Euler ( in Scalar x, in Scalar y, in Scalar z )
Constructor using three Scalars as angles in radians, RotationOrder = XYZ
Euler ( in Scalar x, in Scalar y, in Scalar z, in RotationOrder order )
Constructor using three Scalars as angles in radians and a RotationOrder
Constructor using a Vec3 as angles in radians, RotationOrder = XYZ
Euler ( in Vec3 angles, in RotationOrder order )
Constructor using a Vec3 as radians and a RotationOrder
Euler ()
Default constructor
Boolean Euler.almostEqual? ( in Euler other, in Scalar precision )
Returns true if this Euler is almost the same as another one (based on a precision)
clone method
Boolean Euler.equal? ( in Euler other )
Returns true if this Euler is the same as another one (precisely)
Returns the angles as a Vec3 in radians
Hash for this value
Euler.set! ( in Scalar x, in Scalar y, in Scalar z )
Setter using three Scalars as angles in radians, RotationOrder = XYZ
Euler.set! ( in Scalar x, in Scalar y, in Scalar z, in RotationOrder order )
Setter using three Scalars as angles in radians and a RotationOrder
Setter using a Vec3 as angles in radians, RotationOrder = XYZ
Euler.set! ( in Vec3 angles, in RotationOrder order )
Setter using a Vec3 as radians and a RotationOrder
Euler.setAngles! ( in Vec3 angles )
Setter using a Vec3 as angles in radians, RotationOrder = XYZ
Converts the Euler to a Mat33 representing the same 3D rotation transformation