Struct graphene::Quaternion [−][src]
pub struct Quaternion(_);
Expand description
A quaternion.
The contents of the Quaternion
structure are private
and should never be accessed directly.
Implementations
Initializes a Quaternion
using an angle
on a
specific axis
.
angle
the rotation on a given axis, in degrees
axis
the axis of rotation, expressed as a vector
Returns
the initialized quaternion
Initializes a Quaternion
using the values of
the Euler angles
on each axis.
See also: init_from_euler()
deg_x
rotation angle on the X axis (yaw), in degrees
deg_y
rotation angle on the Y axis (pitch), in degrees
deg_z
rotation angle on the Z axis (roll), in degrees
Returns
the initialized quaternion
Initializes a Quaternion
using the rotation components
of a transformation matrix.
m
a Matrix
Returns
the initialized quaternion
Initializes a Quaternion
using the values of
the Euler angles
on each axis.
See also: init_from_euler()
rad_x
rotation angle on the X axis (yaw), in radians
rad_y
rotation angle on the Y axis (pitch), in radians
rad_z
rotation angle on the Z axis (roll), in radians
Returns
the initialized quaternion
Inverts a Quaternion
, and returns the conjugate
quaternion of self
.
Returns
res
return location for the inverted quaternion
Scales all the elements of a Quaternion
self
using
the given scalar factor.
factor
a scaling factor
Returns
res
the result of the operation
Converts a Quaternion
to its corresponding rotations
on the Euler angles
on each axis.
Returns
deg_x
return location for the rotation angle on the X axis (yaw), in degrees
deg_y
return location for the rotation angle on the Y axis (pitch), in degrees
deg_z
return location for the rotation angle on the Z axis (roll), in degrees
Converts a quaternion into a transformation matrix expressing
the rotation defined by the Quaternion
.
Returns
m
a Matrix
Converts a Quaternion
to its corresponding rotations
on the Euler angles
on each axis.
Returns
rad_x
return location for the rotation angle on the X axis (yaw), in radians
rad_y
return location for the rotation angle on the Y axis (pitch), in radians
rad_z
return location for the rotation angle on the Z axis (roll), in radians
Trait Implementations
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
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for Quaternion
impl !Send for Quaternion
impl !Sync for Quaternion
impl Unpin for Quaternion
impl UnwindSafe for Quaternion
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,