Reinstate min/max methods
This commit is contained in:
parent
fc0f4d267c
commit
cef3c92b11
3 changed files with 52 additions and 23 deletions
19
src/mesh.h
19
src/mesh.h
|
@ -11,14 +11,17 @@ class Mesh
|
|||
public:
|
||||
Mesh(std::vector<GLfloat> vertices, std::vector<GLuint> indices);
|
||||
static Mesh* load_stl(const QString& filename);
|
||||
/*
|
||||
float xmin() const { return vertices.row(0).minCoeff(); }
|
||||
float xmax() const { return vertices.row(0).maxCoeff(); }
|
||||
float ymin() const { return vertices.row(1).minCoeff(); }
|
||||
float ymax() const { return vertices.row(1).maxCoeff(); }
|
||||
float zmin() const { return vertices.row(2).minCoeff(); }
|
||||
float zmax() const { return vertices.row(2).maxCoeff(); }
|
||||
*/
|
||||
|
||||
float min(size_t start) const;
|
||||
float max(size_t start) const;
|
||||
|
||||
float xmin() const { return min(0); }
|
||||
float ymin() const { return min(1); }
|
||||
float zmin() const { return min(2); }
|
||||
float xmax() const { return max(0); }
|
||||
float ymax() const { return max(1); }
|
||||
float zmax() const { return max(2); }
|
||||
|
||||
private:
|
||||
std::vector<GLfloat> vertices;
|
||||
std::vector<GLuint> indices;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue