summaryrefslogtreecommitdiff
path: root/game/network/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/network/network.cpp')
-rw-r--r--game/network/network.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/game/network/network.cpp b/game/network/network.cpp
new file mode 100644
index 0000000..adda8fc
--- /dev/null
+++ b/game/network/network.cpp
@@ -0,0 +1,15 @@
+#include "network.h"
+#include <cache.h>
+#include <game/network/link.h>
+#include <gfx/models/texture.h>
+
+Network::Network(const std::string & tn) : texture {Texture::cachedTexture.get(tn)} { }
+
+NodePtr
+Network::findNodeAt(glm::vec3 pos) const
+{
+ if (const auto n = nodes.find(std::make_shared<Node>(pos)); n != nodes.end()) {
+ return *n;
+ }
+ return {};
+}