Struct tiny_game_framework::Mesh
source · pub struct Mesh {
pub vertices: Vec<Vertex>,
pub indices: Vec<u32>,
pub VAO: u32,
pub position: Vec3,
pub rotation: Quat,
pub scale: Vec3,
/* private fields */
}
Fields§
§vertices: Vec<Vertex>
§indices: Vec<u32>
§VAO: u32
§position: Vec3
§rotation: Quat
§scale: Vec3
Implementations§
source§impl Mesh
impl Mesh
pub fn new(vertices: &Vec<Vertex>, indices: &Vec<u32>) -> Self
pub fn set_shader(&mut self, shader: &Shader)
pub fn set_position(&mut self, position: Vec3)
pub fn add_position(&mut self, position: Vec3)
pub fn scale(&mut self, scale: f32)
pub unsafe fn setup_mesh(&mut self)
pub unsafe fn draw(&self, el: &EventLoop)
Trait Implementations§
source§impl PartialEq for Mesh
impl PartialEq for Mesh
impl StructuralPartialEq for Mesh
Auto Trait Implementations§
impl Freeze for Mesh
impl RefUnwindSafe for Mesh
impl Send for Mesh
impl Sync for Mesh
impl Unpin for Mesh
impl UnwindSafe for Mesh
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