summaryrefslogtreecommitdiff
path: root/test/test-network.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-10-08 15:51:19 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-10-08 15:51:19 +0100
commit6aba7c7dd1d6bcc1ddb4a5acb61ec0850c420824 (patch)
tree79e1bed8444b636326e169fa93d761e17ed3ed20 /test/test-network.cpp
parentSplit network intersect ray functions and return specific types (diff)
downloadilt-6aba7c7dd1d6bcc1ddb4a5acb61ec0850c420824.tar.bz2
ilt-6aba7c7dd1d6bcc1ddb4a5acb61ec0850c420824.tar.xz
ilt-6aba7c7dd1d6bcc1ddb4a5acb61ec0850c420824.zip
Add addStright to Network which looks up StraightLink in the network type
Diffstat (limited to 'test/test-network.cpp')
-rw-r--r--test/test-network.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test-network.cpp b/test/test-network.cpp
index 70f2428..af2c76e 100644
--- a/test/test-network.cpp
+++ b/test/test-network.cpp
@@ -19,7 +19,9 @@
#include <vector>
struct TestLink : public LinkStraight {
+ TestLink(NodePtr a, NodePtr b) : TestLink {a, b, glm::distance(a->pos, b->pos)} { }
TestLink(NodePtr a, NodePtr b, float l) : Link {{std::move(a), 0}, {std::move(b), pi}, l} { }
+ using StraightLink = TestLink;
};
constexpr glm::vec3 p000 {0, 0, 0}, p100 {1, 0, 0}, p200 {2, 0, 0}, p300 {3, 0, 0};