1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
pub(crate) type Vec2 = [f32; 2];
pub(crate) type Vec3 = [f32; 3];
pub(crate) type Face = [u32; 3];
pub(crate) type Color4 = [f32; 4];
pub(crate) const MAX_NUMBER_OF_TEXCOORDS: usize = 2;
pub(crate) const MAX_NUMBER_OF_COLOR_SETS: usize = 2;
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Scene {
pub meshes: Vec<Mesh>,
}
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Mesh {
pub name: String,
pub vertices: Vec<Vec3>,
pub texcoords: [Vec<Vec2>; MAX_NUMBER_OF_TEXCOORDS],
pub normals: Vec<Vec3>,
pub faces: Vec<Face>,
pub colors: [Vec<Color4>; MAX_NUMBER_OF_COLOR_SETS],
}