Skip to main content

Transformable

Trait Transformable 

Source
pub trait Transformable:
    Movable
    + Rotable
    + Scalable {
    // Required methods
    fn contain<T>(&self, offset: Vector<T>) -> bool
       where T: Scalar + Into<f32>;
    fn set_origin<T>(&mut self, origin: Vector<T>)
       where T: Scalar + Into<f32>;
    fn get_origin(&self) -> Vector<f32>;
}
Expand description

A trait that define something fully transformable.

Required Methods§

Source

fn contain<T>(&self, offset: Vector<T>) -> bool
where T: Scalar + Into<f32>,

Move the sprite off the offset.

Source

fn set_origin<T>(&mut self, origin: Vector<T>)
where T: Scalar + Into<f32>,

Set the origin of the object.

Source

fn get_origin(&self) -> Vector<f32>

Get the origin of the transformable.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§