pub struct Model {
pub vertices: Vec<Vertex>,
pub normals: Vec<Normal>,
pub textures: Vec<Texture>,
pub faces: HashMap<String, Vec<Face>>,
pub lines: HashMap<String, Vec<Line>>,
pub points: HashMap<String, Vec<Point>>,
pub groups: HashMap<String, Group>,
pub material_libs: Vec<String>,
pub texture_libs: Vec<String>,
pub shadow_obj: Option<String>,
pub trace_obj: Option<String>,
/* private fields */
}Expand description
This holds the end result of parsing an obj file. The default group for all models is “default”. That is to say, if no group is defined in a file, a “default” group will be used.
Everything will fall under the “default” group until another group is specified.
Fields§
§vertices: Vec<Vertex>Collection of vertex data
normals: Vec<Normal>§textures: Vec<Texture>Collection of texture coordinate data
faces: HashMap<String, Vec<Face>>A map of group name to a collection of faces which belong to the group Everything will fall under the “default” group until another group is specified.
lines: HashMap<String, Vec<Line>>A map of group name to a collection of lines. Everything will fall under the “default” group until another group is specified.
points: HashMap<String, Vec<Point>>A map of group name to a collection of points. Everything will fall under the “default” group until another group is specified.
groups: HashMap<String, Group>A map of group name to the groups specific data. Everything will fall under the “default” group until another group is specified.
material_libs: Vec<String>The material library files to use with this obj.
texture_libs: Vec<String>The texture library files to use with this obj.
shadow_obj: Option<String>The file name for the shadow object
trace_obj: Option<String>The file name for the ray trace object
Trait Implementations§
Source§impl From<(Vec<Vertex>, Vec<Normal>, Vec<Texture>, HashMap<String, Vec<Face>>, HashMap<String, Vec<Line>>, HashMap<String, Vec<Point>>, HashMap<String, Group>, Vec<String>, Vec<String>, Option<String>, Option<String>, Vec<String>, i32)> for Model
impl From<(Vec<Vertex>, Vec<Normal>, Vec<Texture>, HashMap<String, Vec<Face>>, HashMap<String, Vec<Line>>, HashMap<String, Vec<Point>>, HashMap<String, Group>, Vec<String>, Vec<String>, Option<String>, Option<String>, Vec<String>, i32)> for Model
Source§fn from(
value: (Vec<Vertex>, Vec<Normal>, Vec<Texture>, HashMap<String, Vec<Face>>, HashMap<String, Vec<Line>>, HashMap<String, Vec<Point>>, HashMap<String, Group>, Vec<String>, Vec<String>, Option<String>, Option<String>, Vec<String>, i32),
) -> Self
fn from( value: (Vec<Vertex>, Vec<Normal>, Vec<Texture>, HashMap<String, Vec<Face>>, HashMap<String, Vec<Line>>, HashMap<String, Vec<Point>>, HashMap<String, Group>, Vec<String>, Vec<String>, Option<String>, Option<String>, Vec<String>, i32), ) -> Self
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)