[][src]Struct c2::Transformation

pub struct Transformation(_);

For transforming the position and rotation of polygons

Implementations

impl Transformation[src]

pub fn new<V: Into<Vec2>>(position: V, rotation: Rotation) -> Transformation[src]

Creates a new transformation with a position and an angle

pub fn position(self) -> Vec2[src]

Gets the position of the tranformation

pub fn set_position(&mut self, position: Vec2)[src]

pub fn rotation(self) -> Rotation[src]

Gets the rotation of the transformation

pub fn set_rotation(&mut self, rotation: Rotation)[src]

Trait Implementations

impl Clone for Transformation[src]

impl Copy for Transformation[src]

impl Debug for Transformation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.