]> git.sur5r.net Git - fstl/blob - src/mesh.h
Move load_stl from Mesh to Loader
[fstl] / src / mesh.h
1 #ifndef MESH_H
2 #define MESH_H
3
4 #include <QString>
5 #include <QtOpenGL/QtOpenGL>
6
7 #include <vector>
8
9 class Mesh
10 {
11 public:
12     Mesh(std::vector<GLfloat> vertices, std::vector<GLuint> indices);
13
14     float min(size_t start) const;
15     float max(size_t start) const;
16
17     float xmin() const { return min(0); }
18     float ymin() const { return min(1); }
19     float zmin() const { return min(2); }
20     float xmax() const { return max(0); }
21     float ymax() const { return max(1); }
22     float zmax() const { return max(2); }
23
24 private:
25     std::vector<GLfloat> vertices;
26     std::vector<GLuint> indices;
27
28     friend class GLMesh;
29 };
30
31 #endif // MESH_H