mpri-graphics-project/Mesh.cpp

26 lines
455 B
C++
Raw Normal View History

2018-01-27 16:28:36 +01:00
#include "Mesh.hpp"
2018-01-27 16:28:36 +01:00
Mesh::Mesh()
{
}
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;
}