pub struct Model {
pub vertices: Vec<[f32; 4]>,
pub normals: Vec<[f32; 3]>,
pub tex_coords: Vec<[f32; 3]>,
pub vertex_indices: Vec<[u32; 3]>,
pub tex_coords_indices: Vec<[u32; 3]>,
pub normal_indices: Vec<[u32; 3]>,
pub vertex_components: usize,
pub tex_coord_components: usize,
}Expand description
A model that is loaded from a .obj file.
This is a raw representation of the obj file without doing any manipulation
of the data. In order to be better consumed by the rendering engine, the data
should be converted into a more appropriate format first.
This type is largely used in tooling for pipeline processing of models.
Fields§
§vertices: Vec<[f32; 4]>The vertices of the model.
normals: Vec<[f32; 3]>The normals of the model.
tex_coords: Vec<[f32; 3]>The texture coordinates of the model.
vertex_indices: Vec<[u32; 3]>The indices of the vertices that make up the faces of the model.
tex_coords_indices: Vec<[u32; 3]>The indices of the texture coordinates that make up the faces of the model.
normal_indices: Vec<[u32; 3]>The indices of the normals that make up the faces of the model.
vertex_components: usizeThe number of components in each vertex.
tex_coord_components: usizeThe number of components in each texture coordinate.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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