RotateTransform

Trait RotateTransform 

Source
pub trait RotateTransform {
    // Required method
    fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut Self;

    // Provided methods
    fn rotate_on_x(&mut self, angle: f64) -> &mut Self { ... }
    fn rotate_on_y(&mut self, angle: f64) -> &mut Self { ... }
    fn rotate_on_z(&mut self, angle: f64) -> &mut Self { ... }
}
Expand description

Rotating operations.

This trait is automatically implemented for DVec3 and [T] where T: RotateTransform.

Required Methods§

Source

fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut Self

Rotate the item by a given angle about a given axis.

Provided Methods§

Source

fn rotate_on_x(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the X axis.

Source

fn rotate_on_y(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the Y axis.

Source

fn rotate_on_z(&mut self, angle: f64) -> &mut Self

Rotate the item by a given angle about the Z axis.

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.

Implementations on Foreign Types§

Source§

impl RotateTransform for DVec3

Source§

fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut Self

Source§

impl<T: RotateTransform> RotateTransform for [T]

Source§

fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut Self

Source§

impl<T: RotateTransform> RotateTransform for Vec<T>

Source§

fn rotate_on_axis(&mut self, axis: DVec3, angle: f64) -> &mut Self

Implementors§