pub struct Mesh {
pub vertices: Vec<Vertex>,
pub indices: Vec<u32>,
pub VAO: u32,
pub position: Vec3,
pub rotation: Quat,
pub scale: Vec3,
pub texture: u32,
pub parent: Option<Box<Mesh>>,
pub children: Vec<Box<Mesh>>,
/* private fields */
}
Fields§
§vertices: Vec<Vertex>
§indices: Vec<u32>
§VAO: u32
§position: Vec3
§rotation: Quat
§scale: Vec3
§texture: u32
§parent: Option<Box<Mesh>>
§children: Vec<Box<Mesh>>
Implementations§
Source§impl Mesh
impl Mesh
pub fn new(vertices: &Vec<Vertex>, indices: &Vec<u32>) -> Self
pub fn set_shader_type(&mut self, shader_type: &ShaderType)
pub fn set_texture(&mut self, texture_name: &str, renderer: &Renderer)
pub fn to_instance(&mut self, data: Vec<InstanceData>, n: usize) -> InstanceMesh
pub fn set_parent(&mut self, parent: Mesh)
pub fn add_child(&mut self, child: Mesh)
pub fn set_color(&mut self, color: Vec4)
pub fn set_position(&mut self, position: Vec3)
pub fn add_position(&mut self, position: Vec3)
pub fn set_scale(&mut self, scale: Vec3)
pub fn scale(&mut self, scale: Vec3)
pub fn set_rotation(&mut self, rotation: Quat)
pub fn rotate(&mut self, rotation: Quat)
pub fn setup_mesh(&mut self)
pub unsafe fn draw(&self)
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more