diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index cc9ccb5a84484154a9c2ed42b76faa5ea96fcde5..adb3da1fd08a0bfe325239c8b6e500656b482489 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -18,17 +18,17 @@ namespace MeshLib { Node::Node(const double coords[3], std::size_t id) - : MathLib::Point3d(coords), _id(id) + : MathLib::Point3dWithID(coords, id) { } Node::Node(double x, double y, double z, std::size_t id) - : MathLib::Point3d(std::array<double,3>({{x, y, z}})), _id(id) + : MathLib::Point3dWithID(std::array<double,3>({{x, y, z}}), id) { } Node::Node(const Node &node) - : MathLib::Point3d(node.getCoords()), _id(node.getID()) + : MathLib::Point3dWithID(node.getCoords(), node.getID()) { } diff --git a/MeshLib/Node.h b/MeshLib/Node.h index 256dd0513b3b77c3fa49e899a658800f56b3dccb..c599cdf393251adb2618b820d056a7793eb6f46b 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -20,7 +20,7 @@ #include <set> #include <vector> -#include "MathLib/Point3d.h" +#include "MathLib/Point3dWithID.h" #include "MeshEditing/removeMeshNodes.h" #include "MeshGenerators/MeshLayerMapper.h" @@ -35,7 +35,7 @@ class Element; /** * A mesh node with coordinates in 3D space. */ -class Node : public MathLib::Point3d +class Node : public MathLib::Point3dWithID { /* friend functions: */ friend bool MeshLayerMapper::layerMapping(MeshLib::Mesh &mesh, const GeoLib::Raster &raster, double noDataReplacementValue); @@ -55,8 +55,6 @@ public: /// Copy constructor Node(const Node &node); - std::size_t getID() const { return _id; } - /// Return all the nodes connected to this one const std::vector<MeshLib::Node*>& getConnectedNodes() const { return _connected_nodes; } @@ -100,7 +98,6 @@ protected: /// This method automatically also updates the areas/volumes of all connected elements. virtual void updateCoordinates(double x, double y, double z); - std::size_t _id; std::vector<Node*> _connected_nodes; std::vector<Element*> _elements; }; /* class */