diff --git a/Mesh.cpp b/Mesh.cpp index 125ab80..815aad2 100644 --- a/Mesh.cpp +++ b/Mesh.cpp @@ -5,12 +5,7 @@ Mesh::Mesh() } size_t Mesh::add_vertice(const Point& pt) { - // Does the vertice already exists? - if (rev_vertices.find(pt) != rev_vertices.end()) - return rev_vertices.find(pt)->second; - vertices.push_back(pt); - rev_vertices.insert(std::make_pair(pt, vertices.size() - 1)); return vertices.size() - 1; } diff --git a/Mesh.hpp b/Mesh.hpp index f66c9d9..63ea5f8 100644 --- a/Mesh.hpp +++ b/Mesh.hpp @@ -26,6 +26,5 @@ class Mesh { private: std::vector vertices; - std::unordered_map rev_vertices; std::vector faces; }; diff --git a/common_structures.hpp b/common_structures.hpp index 173679f..3993966 100644 --- a/common_structures.hpp +++ b/common_structures.hpp @@ -22,15 +22,6 @@ struct Face { }; namespace std { - template<> struct hash { typedef Point argument_type; - typedef std::size_t result_type; - result_type operator()(const argument_type& pt) const noexcept { - return (hash()(pt.x) << 2) - ^ (hash()(pt.y) << 1) - ^ hash()(pt.z); - } - }; - template<> struct hash { typedef Face argument_type;