clray
view src/mesh.h @ 10:2da57bedc550
added vs project
author | John Tsiombikas |
---|---|
date | Fri, 30 Jul 2010 19:28:18 +0100 |
parents | b06518bb16e9 |
children | 85fd61f374d9 |
line source
1 #ifndef MESH_H_
2 #define MESH_H_
4 #include <vector>
6 struct Vertex {
7 float pos[4];
8 float normal[4];
9 float tex[2];
10 };
12 struct Face {
13 Vertex v[3];
14 float normal[4];
15 int matid;
16 };
18 struct Material {
19 float kd[4], ks[4];
20 float kr, kt;
21 float spow;
22 };
24 struct Mesh {
25 std::vector<Face> faces;
26 int matid;
27 };
29 class Scene {
30 public:
31 std::vector<Mesh*> meshes;
32 std::vector<Material> matlib;
34 bool load(const char *fname);
35 bool load(FILE *fp);
36 };
38 #endif /* MESH_H_ */