pub struct TexturedPolygon<T: Borrow<Texture>> { /* private fields */ }
Implementations§
Source§impl<T: Borrow<Texture>> TexturedPolygon<T>
impl<T: Borrow<Texture>> TexturedPolygon<T>
pub fn new(vertices: Vec<TexturedVertex>, texture: T) -> Self
pub fn with_mode( vertices: Vec<TexturedVertex>, texture: T, draw_mode: DrawMode, ) -> Self
pub fn strip(vertices: Vec<TexturedVertex>, texture: T) -> Self
Trait Implementations§
Source§impl<T: Borrow<Texture>> Draw2d for TexturedPolygon<T>
impl<T: Borrow<Texture>> Draw2d for TexturedPolygon<T>
fn draw2d_transformed( &self, helper: &Helper, framebuffer: &mut Framebuffer<'_>, camera: &dyn AbstractCamera2d, transform: mat3<f32>, )
fn draw2d( &self, helper: &Helper, framebuffer: &mut Framebuffer<'_>, camera: &dyn AbstractCamera2d, )
Source§impl<T: Borrow<Texture>> Transform2d<f32> for TexturedPolygon<T>
impl<T: Borrow<Texture>> Transform2d<f32> for TexturedPolygon<T>
Auto Trait Implementations§
impl<T> Freeze for TexturedPolygon<T>where
T: Freeze,
impl<T> RefUnwindSafe for TexturedPolygon<T>where
T: RefUnwindSafe,
impl<T> Send for TexturedPolygon<T>where
T: Send,
impl<T> Sync for TexturedPolygon<T>where
T: Sync,
impl<T> Unpin for TexturedPolygon<T>where
T: Unpin,
impl<T> UnwindSafe for TexturedPolygon<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<F, T> Transform2dExt<F> for T
impl<F, T> Transform2dExt<F> for T
Source§fn transform(self, transform: mat3<F>) -> Selfwhere
Self: Sized,
fn transform(self, transform: mat3<F>) -> Selfwhere
Self: Sized,
Apply transformation to the object, returning a modified value to allow chaining methods
Source§fn align_bounding_box(self, alignment: vec2<F>) -> Selfwhere
Self: Sized,
fn align_bounding_box(self, alignment: vec2<F>) -> Selfwhere
Self: Sized,
Align bounding box of this object, making its origin located at (0, 0) Read more
Source§fn rotate(self, angle: Angle<F>) -> Selfwhere
Self: Sized,
fn rotate(self, angle: Angle<F>) -> Selfwhere
Self: Sized,
Rotate object around (0, 0) by given angle
Source§fn scale(self, factor: vec2<F>) -> Selfwhere
Self: Sized,
fn scale(self, factor: vec2<F>) -> Selfwhere
Self: Sized,
Scale object around (0, 0) by given factor
Source§fn scale_uniform(self, factor: F) -> Selfwhere
Self: Sized,
fn scale_uniform(self, factor: F) -> Selfwhere
Self: Sized,
Scale object around (0, 0) by given factor uniformly along both axis
Source§fn transformed(&self) -> Transformed2d<'_, F, Self>
fn transformed(&self) -> Transformed2d<'_, F, Self>
Create a reference to this object with additional transformation applied