2018-01-27 16:28:36 +01:00
|
|
|
#include "Mesh.hpp"
|
2018-01-27 14:59:17 +01:00
|
|
|
|
2018-01-27 16:28:36 +01:00
|
|
|
Mesh::Mesh()
|
|
|
|
{
|
|
|
|
}
|
2018-01-27 14:59:17 +01:00
|
|
|
|
2018-01-27 16:28:36 +01:00
|
|
|
size_t Mesh::add_vertice(const Point& pt) {
|
|
|
|
vertices.push_back(pt);
|
|
|
|
return vertices.size() - 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Mesh::add_face(const Face& face) {
|
|
|
|
faces.push_back(face);
|
|
|
|
}
|
|
|
|
void Mesh::add_face(size_t f1, size_t f2, size_t f3) {
|
|
|
|
add_face(Face(f1, f2, f3));
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<Point>& Mesh::get_vertices() const {
|
|
|
|
return vertices;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<Face>& Mesh::get_faces() const {
|
|
|
|
return faces;
|
|
|
|
}
|