summaryrefslogtreecommitdiff
path: root/game/network/network.impl.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-14 18:11:40 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-14 18:11:40 +0100
commit6a347439a76e265aa66fd3bcce6ff5665b8d8662 (patch)
tree48051450d5ac78e805aadce9d102f9c11188f44e /game/network/network.impl.h
parentFix const correctness of Texture from raw data (diff)
downloadilt-6a347439a76e265aa66fd3bcce6ff5665b8d8662.tar.bz2
ilt-6a347439a76e265aa66fd3bcce6ff5665b8d8662.tar.xz
ilt-6a347439a76e265aa66fd3bcce6ff5665b8d8662.zip
Network candidate links
Returns a collection of links/nodes without adding them to the network, suitable for displaying in the UI during a design/build process
Diffstat (limited to 'game/network/network.impl.h')
-rw-r--r--game/network/network.impl.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/game/network/network.impl.h b/game/network/network.impl.h
index 68da5d9..6769320 100644
--- a/game/network/network.impl.h
+++ b/game/network/network.impl.h
@@ -38,10 +38,24 @@ NetworkOf<T>::intersectRayLinks(const Ray & ray) const
}
template<typename T>
-Link::CPtr
+Link::CCollection
+NetworkOf<T>::candidateStraight(glm::vec3 n1, glm::vec3 n2)
+{
+ return {candidateLink<typename T::StraightLink>(n1, n2)};
+}
+
+template<typename T>
+Link::CCollection
+NetworkOf<T>::candidateJoins(glm::vec3 n1, glm::vec3 n2)
+{
+ return {candidateLink<typename T::StraightLink>(n1, n2)};
+}
+
+template<typename T>
+Link::CCollection
NetworkOf<T>::addStraight(glm::vec3 n1, glm::vec3 n2)
{
- return addLink<typename T::StraightLink>(n1, n2);
+ return {addLink<typename T::StraightLink>(n1, n2)};
}
template<typename T>