Skip to main content

Rotable

Trait Rotable 

Source
pub trait Rotable {
    // Required methods
    fn rotate<T>(&mut self, angle: T)
       where T: Scalar + Into<f32>;
    fn set_rotation<T>(&mut self, angle: T)
       where T: Scalar + Into<f32>;
    fn get_rotation(&self) -> f32;
}
Expand description

A trait that define everything that can rotate in a 3D space.

Required Methods§

Source

fn rotate<T>(&mut self, angle: T)
where T: Scalar + Into<f32>,

Rotate from the actual angle with the angle given in argument.

Source

fn set_rotation<T>(&mut self, angle: T)
where T: Scalar + Into<f32>,

Set the rotation of the Rotable struct.

Source

fn get_rotation(&self) -> f32

Return the rotation of the struct.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§