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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#![deny(missing_docs)]
extern crate range;
extern crate wavefront_obj as wobj;
pub use geometry::Geometry;
pub use object::Object;
pub use model::Model;
use std::marker::PhantomData;
mod geometry;
mod object;
mod model;
pub struct AddTo<T>(PhantomData<T>);
pub trait Vertex {
fn set_position(&mut self, [f32; 3]);
fn set_texture_coords(&mut self, [f32; 2]);
fn set_normal(&mut self, [f32; 3]);
}
pub enum VertexFormat {
Position,
PositionTexture,
PositionNormal,
PositionTextureNormal,
}
#[derive(Debug)]
pub enum VertexFormatError {
ExpectedSameVertexFormatPerGeometry,
}