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§
Sourcefn rotate<T>(&mut self, angle: T)
fn rotate<T>(&mut self, angle: T)
Rotate from the actual angle with the angle given in argument.
Sourcefn set_rotation<T>(&mut self, angle: T)
fn set_rotation<T>(&mut self, angle: T)
Set the rotation of the Rotable struct.
Sourcefn get_rotation(&self) -> f32
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".