Struct ascending_graphics::Mesh2D
source · pub struct Mesh2D {
pub position: Vec3,
pub size: Vec2,
pub color: Color,
pub vertices: Vec<Mesh2DVertex>,
pub indices: Vec<u32>,
pub vbo_store_id: Index,
pub order: DrawOrder,
pub high_index: u32,
pub changed: bool,
}Fields§
§position: Vec3§size: Vec2§color: Color§vertices: Vec<Mesh2DVertex>§indices: Vec<u32>§vbo_store_id: Index§order: DrawOrder§high_index: u32§changed: boolImplementations§
source§impl Mesh2D
impl Mesh2D
pub fn new(renderer: &mut GpuRenderer) -> Self
pub fn from_builder(&mut self, builder: Mesh2DBuilder)
pub fn set_color(&mut self, color: Color) -> &mut Self
pub fn set_position(&mut self, position: Vec3) -> &mut Self
pub fn set_size(&mut self, size: Vec2) -> &mut Self
pub fn create_quad(&mut self, renderer: &mut GpuRenderer)
pub fn update(&mut self, renderer: &mut GpuRenderer) -> OrderedIndex
pub fn check_mouse_bounds(&self, mouse_pos: Vec2) -> bool
Auto Trait Implementations§
impl Freeze for Mesh2D
impl RefUnwindSafe for Mesh2D
impl Send for Mesh2D
impl Sync for Mesh2D
impl Unpin for Mesh2D
impl UnwindSafe for Mesh2D
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.