diff --git a/MeshLib/Node.cpp b/MeshLib/Node.cpp index adb3da1fd08a0bfe325239c8b6e500656b482489..ece3d311e821db71cd44d44687659ded0e1d8b45 100644 --- a/MeshLib/Node.cpp +++ b/MeshLib/Node.cpp @@ -22,6 +22,11 @@ Node::Node(const double coords[3], std::size_t id) { } +Node::Node(std::array<double, 3> const& coords, std::size_t id) + : MathLib::Point3dWithID(coords, id) +{ +} + Node::Node(double x, double y, double z, std::size_t id) : MathLib::Point3dWithID(std::array<double,3>({{x, y, z}}), id) { diff --git a/MeshLib/Node.h b/MeshLib/Node.h index c599cdf393251adb2618b820d056a7793eb6f46b..cbf789f62e20d5a8d11990fe36a10cb93e6582c3 100644 --- a/MeshLib/Node.h +++ b/MeshLib/Node.h @@ -49,6 +49,9 @@ public: /// Constructor using a coordinate array Node(const double coords[3], std::size_t id = std::numeric_limits<std::size_t>::max()); + /// Constructor using a coordinate array + Node(std::array<double, 3> const& coords, std::size_t id = std::numeric_limits<std::size_t>::max()); + /// Constructor using single coordinates Node(double x, double y, double z, std::size_t id = std::numeric_limits<std::size_t>::max());