diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-02-13 01:36:42 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-02-13 01:36:42 +0000 |
commit | 849f4aa735352704995ffb51bf23dadf795bb119 (patch) | |
tree | 6f610f55791d7dc7ade6ebf5be42227f63979f75 /ui | |
parent | Add helpers for testing for triangle overlap/containedness (diff) | |
download | ilt-849f4aa735352704995ffb51bf23dadf795bb119.tar.bz2 ilt-849f4aa735352704995ffb51bf23dadf795bb119.tar.xz ilt-849f4aa735352704995ffb51bf23dadf795bb119.zip |
Include face handle in intersectRay result
Diffstat (limited to 'ui')
-rw-r--r-- | ui/builders/freeExtend.cpp | 6 | ||||
-rw-r--r-- | ui/builders/straight.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ui/builders/freeExtend.cpp b/ui/builders/freeExtend.cpp index 47356c3..db127e6 100644 --- a/ui/builders/freeExtend.cpp +++ b/ui/builders/freeExtend.cpp @@ -19,7 +19,7 @@ BuilderFreeExtend::move( candidateLinks.objects = network->candidateJoins(*p1, p->pos); } else if (const auto p = geoData->intersectRay(ray)) { - candidateLinks.objects = network->candidateExtend(*p1, *p); + candidateLinks.objects = network->candidateExtend(*p1, p->first); } else { candidateLinks.removeAll(); @@ -42,8 +42,8 @@ BuilderFreeExtend::click( p1 = p->pos; } else if (const auto p = geoData->intersectRay(ray)) { - network->addExtend(*p1, *p); - p1 = *p; + network->addExtend(*p1, p->first); + p1 = p->first; } } else { diff --git a/ui/builders/straight.cpp b/ui/builders/straight.cpp index 0c4a3e2..43f5ec8 100644 --- a/ui/builders/straight.cpp +++ b/ui/builders/straight.cpp @@ -16,7 +16,7 @@ BuilderStraight::move( { if (p1) { if (const auto p = geoData->intersectRay(ray)) { - candidateLinks.objects = network->candidateStraight(*p1, *p); + candidateLinks.objects = network->candidateStraight(*p1, p->first); } else { candidateLinks.removeAll(); @@ -32,12 +32,12 @@ BuilderStraight::click( case SDL_BUTTON_LEFT: if (const auto p = geoData->intersectRay(ray)) { if (p1) { - create(network, *p1, *p); + create(network, *p1, p->first); candidateLinks.removeAll(); p1.reset(); } else { - p1 = p; + p1 = p->first; } } return; |