pub struct Sprite {
    pub origin: Point3D<f32, WorldSpace>,
    pub size: Size2D<f32, ObjectSpace>,
    pub rotation: Rotation3D<f32, ObjectSpace, ObjectSpace>,
    pub texture: Rc<Texture>,
}
Expand description

Basic textured rectangle. Basic textured rectangle. Uses the same position and size system as super::primative::Rectangle with an origin at its centre and a width and height Uses the QuadPipe pipeline

Fields

origin: Point3D<f32, WorldSpace>

The centre of the sprite

size: Size2D<f32, ObjectSpace>

The size of the sprite

rotation: Rotation3D<f32, ObjectSpace, ObjectSpace>

The rotation of the sprite

texture: Rc<Texture>

The texture of the sprite

Implementations

Create a new sprite

Translate the sprite

Set the sprites size

Update the texture of the sprite

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.