e2rcore/interface/
i_wavefront.rs

1extern crate mazth;
2
3
4///obj file format
5pub mod obj {
6
7    #[derive(Debug, Clone)]
8    pub struct Face {
9        pub _vert_index: [ usize; 3 ],
10        pub _tc_index: Option< [ usize; 3 ] >,
11        pub _normal_index: Option< [ usize; 3 ] >,
12    }
13    
14    #[derive(Debug, Clone)]
15    pub struct Group {
16        pub _name: Option<String>,
17        pub _group: Option<String>,
18        pub _material: Option<String>,
19        pub _verts: Vec< [ f32; 3 ] >,
20        pub _vert_normals: Vec< [ f32; 3] >,
21        pub _faces: Vec< Face >,
22        pub _texture_coords: Vec< [ f32; 2 ] >,
23    }
24
25    #[derive(Debug, Clone)]
26    pub struct Collection {
27        pub _mtllib: String,
28        pub _groups: Vec< Group >,
29    }
30
31}
32
33pub mod compute {
34
35    #[derive(Debug, Clone)]
36    pub struct ComputeCollection {
37
38        pub _bbox_lower: [f32;3],
39        pub _bbox_upper: [f32;3],
40
41        pub _batch_vert: Vec< f32 >,
42        pub _batch_normal: Vec< f32 >,
43        pub _batch_tc: Vec< f32 >,
44    }
45}