]> git.sur5r.net Git - fstl/blob - src/mesh.h
f8da3e3903e6854aeef6cb24d6d798a968d6aac9
[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     static Mesh* load_stl(const QString& filename);
14 /*
15     float xmin() const { return vertices.row(0).minCoeff(); }
16     float xmax() const { return vertices.row(0).maxCoeff(); }
17     float ymin() const { return vertices.row(1).minCoeff(); }
18     float ymax() const { return vertices.row(1).maxCoeff(); }
19     float zmin() const { return vertices.row(2).minCoeff(); }
20     float zmax() const { return vertices.row(2).maxCoeff(); }
21 */
22 private:
23     std::vector<GLfloat> vertices;
24     std::vector<GLuint> indices;
25
26     friend class GLMesh;
27 };
28
29 #endif // MESH_H