diff options
Diffstat (limited to 'ui/builders/freeExtend.cpp')
-rw-r--r-- | ui/builders/freeExtend.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/builders/freeExtend.cpp b/ui/builders/freeExtend.cpp index db127e6..904e144 100644 --- a/ui/builders/freeExtend.cpp +++ b/ui/builders/freeExtend.cpp @@ -38,11 +38,11 @@ BuilderFreeExtend::click( case SDL_BUTTON_LEFT: if (p1) { if (const auto p = network->intersectRayNodes(ray)) { - network->addJoins(*p1, p->pos); + createJoin(network, *p1, p->pos); p1 = p->pos; } else if (const auto p = geoData->intersectRay(ray)) { - network->addExtend(*p1, p->first); + createExtend(network, *p1, p->first); p1 = p->first; } } @@ -57,3 +57,15 @@ BuilderFreeExtend::click( return; } } + +Link::CCollection +BuilderFreeExtend::createJoin(Network * network, GlobalPosition3D p1, GlobalPosition3D p2) const +{ + return network->addJoins(p1, p2); +} + +Link::CCollection +BuilderFreeExtend::createExtend(Network * network, GlobalPosition3D p1, GlobalPosition3D p2) const +{ + return network->addExtend(p1, p2); +} |