Mostly complete from the Python original
This commit is contained in:
commit
97cf902b87
18 changed files with 527 additions and 0 deletions
28
src/mesh.h
Normal file
28
src/mesh.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef MESH_H
|
||||
#define MESH_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <Eigen/Dense>
|
||||
|
||||
class Mesh
|
||||
{
|
||||
public:
|
||||
Mesh(const Eigen::Matrix3Xf &vertices, const Eigen::Matrix3Xi &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(); }
|
||||
|
||||
private:
|
||||
const Eigen::Matrix3Xf vertices;
|
||||
const Eigen::Matrix3Xi indices;
|
||||
|
||||
friend class GLMesh;
|
||||
};
|
||||
|
||||
#endif // MESH_H
|
Loading…
Add table
Add a link
Reference in a new issue