Struct graphene::Euler[][src]

pub struct Euler(_);
Expand description

Describe a rotation using Euler angles.

The contents of the Euler structure are private and should never be accessed directly.

Implementations

Retrieves the first component of the Euler angle vector, depending on the order of rotation.

See also: x()

Returns

the first component of the Euler angle vector, in radians

Retrieves the second component of the Euler angle vector, depending on the order of rotation.

See also: y()

Returns

the second component of the Euler angle vector, in radians

Retrieves the third component of the Euler angle vector, depending on the order of rotation.

See also: z()

Returns

the third component of the Euler angle vector, in radians

Retrieves the order used to apply the rotations described in the Euler structure, when converting to and from other structures, like Quaternion and Matrix.

This function does not return the EulerOrder::Default enumeration value; it will return the effective order of rotation instead.

Returns

the order used to apply the rotations

Retrieves the rotation angle on the X axis, in degrees.

Returns

the rotation angle

Retrieves the rotation angle on the Y axis, in degrees.

Returns

the rotation angle

Retrieves the rotation angle on the Z axis, in degrees.

Returns

the rotation angle

Initializes a Euler using the given angles.

The order of the rotations is EulerOrder::Default.

x

rotation angle on the X axis, in degrees

y

rotation angle on the Y axis, in degrees

z

rotation angle on the Z axis, in degrees

Returns

the initialized Euler

Initializes a Euler using the angles and order of another Euler.

If the Euler src is None, this function is equivalent to calling init() with all angles set to 0.

src

a Euler

Returns

the initialized Euler

Initializes a Euler using the given rotation matrix.

If the Matrix m is None, the Euler will be initialized with all angles set to 0.

m

a rotation matrix

order

the order used to apply the rotations

Returns

the initialized Euler

Initializes a Euler using the given normalized quaternion.

If the Quaternion q is None, the Euler will be initialized with all angles set to 0.

q

a normalized Quaternion

order

the order used to apply the rotations

Returns

the initialized Euler

Initializes a Euler using the given angles and order of rotation.

x

rotation angle on the X axis, in radians

y

rotation angle on the Y axis, in radians

z

rotation angle on the Z axis, in radians

order

order of rotations

Returns

the initialized Euler

Initializes a Euler using the angles contained in a Vec3.

If the Vec3 v is None, the Euler will be initialized with all angles set to 0.

v

a Vec3 containing the rotation angles in degrees

order

the order used to apply the rotations

Returns

the initialized Euler

Initializes a Euler with the given angles and order.

x

rotation angle on the X axis, in degrees

y

rotation angle on the Y axis, in degrees

z

rotation angle on the Z axis, in degrees

order

the order used to apply the rotations

Returns

the initialized Euler

Reorders a Euler using order.

This function is equivalent to creating a Quaternion from the given Euler, and then converting the quaternion into another Euler.

order

the new order

Returns

res

return location for the reordered Euler

Converts a Euler into a transformation matrix expressing the extrinsic composition of rotations described by the Euler angles.

The rotations are applied over the reference frame axes in the order associated with the Euler; for instance, if the order used to initialize self is EulerOrder::Xyz:

  • the first rotation moves the body around the X axis with an angle φ
  • the second rotation moves the body around the Y axis with an angle of ϑ
  • the third rotation moves the body around the Z axis with an angle of ψ

The rotation sign convention is right-handed, to preserve compatibility between Euler-based, quaternion-based, and angle-axis-based rotations.

Returns

res

return location for a Matrix

Converts a Euler into a Quaternion.

Returns

res

return location for a Quaternion

Retrieves the angles of a Euler and initializes a Vec3 with them.

Returns

res

return location for a Vec3

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the type identifier of Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.