Trait cgmath::prelude::Rotation3

source ·
pub trait Rotation3<S: BaseFloat>: Rotation<Point3<S>> + Into<Matrix3<S>> + Into<Basis3<S>> + Into<Quaternion<S>> {
    // Required methods
    fn from_axis_angle(axis: Vector3<S>, angle: Rad<S>) -> Self;
    fn from_euler(x: Rad<S>, y: Rad<S>, z: Rad<S>) -> Self;

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

A three-dimensional rotation.

Required Methods§

source

fn from_axis_angle(axis: Vector3<S>, angle: Rad<S>) -> Self

Create a rotation using an angle around a given axis.

source

fn from_euler(x: Rad<S>, y: Rad<S>, z: Rad<S>) -> Self

Create a rotation from a set of euler angles.

Parameters
  • x: the angular rotation around the x axis (pitch).
  • y: the angular rotation around the y axis (yaw).
  • z: the angular rotation around the z axis (roll).

Provided Methods§

source

fn from_angle_x(theta: Rad<S>) -> Self

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

source

fn from_angle_y(theta: Rad<S>) -> Self

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

source

fn from_angle_z(theta: Rad<S>) -> Self

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

Implementors§