mpri-graphics-project/Mesh.cpp
2018-01-27 16:39:08 +01:00

25 lines
455 B
C++

#include "Mesh.hpp"
Mesh::Mesh()
{
}
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;
}