summaryrefslogtreecommitdiff
path: root/ui/builders/freeExtend.h
blob: 8e30ef4d3dfea7523f3e46bb8ca50a718727d969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include "../editNetwork.h"

class Network;
class GeoData;

class BuilderFreeExtend : public EditNetwork::Builder {
private:
	std::string hint() const override;
	void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e,
			const Ray<GlobalPosition3D> & ray) override;
	void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e,
			const Ray<GlobalPosition3D> & ray) override;

public:
	Link::CCollection createJoin(Network * network, GlobalPosition3D, GlobalPosition3D) const;
	Link::CCollection createExtend(Network * network, GlobalPosition3D, GlobalPosition3D) const;

private:
	std::optional<GlobalPosition3D> p1;
};