[][src]Struct specs_transform::Transform2D

pub struct Transform2D<T> {
    pub position: [T; 2],
    pub scale: [T; 2],
    pub rotation: T,
}

Fields

position: [T; 2]scale: [T; 2]rotation: T

Methods

impl<T> Transform2D<T> where
    T: Zero + One
[src]

pub fn new(position: [T; 2], scale: [T; 2], rotation: T) -> Self[src]

pub fn with_position(self, position: [T; 2]) -> Self[src]

pub fn with_scale(self, scale: [T; 2]) -> Self[src]

pub fn with_rotation(self, rotation: T) -> Self[src]

pub fn set_position(&mut self, position: [T; 2]) -> &mut Self[src]

pub fn set_scale(&mut self, scale: [T; 2]) -> &mut Self[src]

pub fn set_rotation(&mut self, rotation: T) -> &mut Self[src]

pub fn matrix(&self) -> [T; 6] where
    T: Float,
    &'a T: Mul<&'b T, Output = T> + Neg<Output = T> + Add<&'b T, Output = T> + Sub<&'b T, Output = T>, 
[src]

Trait Implementations

impl<T> Default for Transform2D<T> where
    T: Zero + One
[src]

impl<T: Debug> Debug for Transform2D<T>[src]

impl<T> Serialize for Transform2D<T> where
    T: Serialize
[src]

impl<'de, T> Deserialize<'de> for Transform2D<T> where
    T: Deserialize<'de>, 
[src]

impl<T> Component for Transform2D<T> where
    T: 'static + Sync + Send
[src]

type Storage = FlaggedStorage<Self, DenseVecStorage<Self>>

Associated storage type for this component.

Auto Trait Implementations

impl<T> Send for Transform2D<T> where
    T: Send

impl<T> Unpin for Transform2D<T> where
    T: Unpin

impl<T> Sync for Transform2D<T> where
    T: Sync

impl<T> UnwindSafe for Transform2D<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Transform2D<T> where
    T: RefUnwindSafe

Blanket Implementations

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

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

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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> TryDefault for T where
    T: Default
[src]

fn unwrap_default() -> Self[src]

Calls try_default and panics on an error case.

impl<T> Any for T where
    T: Any

impl<T> Event for T where
    T: Send + Sync + 'static,