summaryrefslogtreecommitdiff
path: root/game/network/network.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-15 15:30:44 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-15 15:30:44 +0100
commitd11d99323d642ebb1cf84302b2b25019e95b5607 (patch)
tree8a2171c2929929b3d3195b6f0de25041998fc8c8 /game/network/network.h
parentRemove unnecessary destructor (diff)
downloadilt-d11d99323d642ebb1cf84302b2b25019e95b5607.tar.bz2
ilt-d11d99323d642ebb1cf84302b2b25019e95b5607.tar.xz
ilt-d11d99323d642ebb1cf84302b2b25019e95b5607.zip
Add free extend builder with placeholder network support
Diffstat (limited to 'game/network/network.h')
-rw-r--r--game/network/network.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/game/network/network.h b/game/network/network.h
index 773426e..b95dfdc 100644
--- a/game/network/network.h
+++ b/game/network/network.h
@@ -33,8 +33,10 @@ public:
virtual Link::CCollection candidateStraight(glm::vec3, glm::vec3) = 0;
virtual Link::CCollection candidateJoins(glm::vec3, glm::vec3) = 0;
+ virtual Link::CCollection candidateExtend(glm::vec3, glm::vec3) = 0;
virtual Link::CCollection addStraight(glm::vec3, glm::vec3) = 0;
virtual Link::CCollection addJoins(glm::vec3, glm::vec3) = 0;
+ virtual Link::CCollection addExtend(glm::vec3, glm::vec3) = 0;
protected:
static void joinLinks(const Link::Ptr & l, const Link::Ptr & ol);
@@ -57,7 +59,8 @@ protected:
public:
template<typename L, typename... Params>
std::shared_ptr<L>
- candidateLink(glm::vec3 a, glm::vec3 b, Params &&... params) requires std::is_base_of_v<T, L>
+ candidateLink(glm::vec3 a, glm::vec3 b, Params &&... params)
+ requires std::is_base_of_v<T, L>
{
const auto node1 = candidateNodeAt(a).first, node2 = candidateNodeAt(b).first;
return std::make_shared<L>(node1, node2, std::forward<Params>(params)...);
@@ -65,7 +68,8 @@ public:
template<typename L, typename... Params>
std::shared_ptr<L>
- addLink(glm::vec3 a, glm::vec3 b, Params &&... params) requires std::is_base_of_v<T, L>
+ addLink(glm::vec3 a, glm::vec3 b, Params &&... params)
+ requires std::is_base_of_v<T, L>
{
const auto node1 = nodeAt(a), node2 = nodeAt(b);
auto l {links.template create<L>(node1, node2, std::forward<Params>(params)...)};
@@ -75,8 +79,10 @@ public:
Link::CCollection candidateStraight(glm::vec3 n1, glm::vec3 n2) override;
Link::CCollection candidateJoins(glm::vec3, glm::vec3) override;
+ Link::CCollection candidateExtend(glm::vec3, glm::vec3) override;
Link::CCollection addStraight(glm::vec3 n1, glm::vec3 n2) override;
Link::CCollection addJoins(glm::vec3, glm::vec3) override;
+ Link::CCollection addExtend(glm::vec3, glm::vec3) override;
void render(const Shader &) const override;
};