Rotation3

Trait Rotation3 

Source
pub trait Rotation3:
    Rotation<Space = Point3<Self::Scalar>>
    + Into<Matrix3<Self::Scalar>>
    + Into<Basis3<Self::Scalar>>
    + Into<Quaternion<Self::Scalar>>
    + From<Euler<Rad<Self::Scalar>>> {
    type Scalar: BaseFloat;

    // Required method
    fn from_axis_angle<A: Into<Rad<Self::Scalar>>>(
        axis: Vector3<Self::Scalar>,
        angle: A,
    ) -> Self;

    // Provided methods
    fn from_angle_x<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self { ... }
    fn from_angle_y<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self { ... }
    fn from_angle_z<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self { ... }
}
Expand description

A three-dimensional rotation.

Required Associated Types§

Required Methods§

Source

fn from_axis_angle<A: Into<Rad<Self::Scalar>>>( axis: Vector3<Self::Scalar>, angle: A, ) -> Self

Create a rotation using an angle around a given axis.

The specified axis must be normalized, or it represents an invalid rotation.

Provided Methods§

Source

fn from_angle_x<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self

Create a rotation from an angle around the x axis (pitch).

Source

fn from_angle_y<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self

Create a rotation from an angle around the y axis (yaw).

Source

fn from_angle_z<A: Into<Rad<Self::Scalar>>>(theta: A) -> Self

Create a rotation from an angle around the z axis (roll).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§