summaryrefslogtreecommitdiff
path: root/game/network/network.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-25 18:49:19 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-28 02:10:47 +0100
commit37b135e59ba22cf9ace1141b9dd21d0819fe3d1d (patch)
tree1b24085262116f04c8869365e50f971af56f7d3d /game/network/network.h
parentMove findDir into member function findNodeDirection (diff)
downloadilt-37b135e59ba22cf9ace1141b9dd21d0819fe3d1d.tar.bz2
ilt-37b135e59ba22cf9ace1141b9dd21d0819fe3d1d.tar.xz
ilt-37b135e59ba22cf9ace1141b9dd21d0819fe3d1d.zip
Implement extending a network into open space
Diffstat (limited to 'game/network/network.h')
-rw-r--r--game/network/network.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/game/network/network.h b/game/network/network.h
index f1ac23f..f37f335 100644
--- a/game/network/network.h
+++ b/game/network/network.h
@@ -15,6 +15,9 @@ class Texture;
class Shader;
class Ray;
+template<size_t... n> using GenDef = std::tuple<glm::vec<n, float>...>;
+using GenCurveDef = GenDef<3, 3, 2>;
+
class Network {
public:
using LinkEnd = std::pair<Link::Ptr, unsigned char>;
@@ -44,6 +47,7 @@ public:
protected:
static void joinLinks(const Link::Ptr & l, const Link::Ptr & ol);
+ static GenCurveDef genCurveDef(const glm::vec3 & start, const glm::vec3 & end, float startDir);
using Nodes = std::set<Node::Ptr, PtrMemberSorter<Node::Ptr, &Node::pos>>;
Nodes nodes;