#include "network.h" #include #include #include #include Network::Network(const std::string & tn) : texture {Texture::cachedTexture.get(tn)} { } NodePtr Network::nodeAt(glm::vec3 pos) { return *nodes.insert(std::make_shared(pos)).first; } std::pair Network::newNodeAt(glm::vec3 pos) { const auto i = nodes.insert(std::make_shared(pos)); return {*i.first, i.second}; } NodePtr Network::findNodeAt(glm::vec3 pos) const { if (const auto n = nodes.find(std::make_shared(pos)); n != nodes.end()) { return *n; } return {}; }