-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopologymanager.h
54 lines (44 loc) · 1.22 KB
/
topologymanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include "entity.h"
enum TopologyCondition {
NoTopology,
Neighbours,
NotNeighbours,
Inside,
Outside,
Intersect,
NoIntersect
};
enum DrawingStage {
Instansing,
Drawing,
Submitting
};
class Entity;
class LineEntity;
class PointEntity;
class PolygonEntity;
class PolylineEntity;
class TopologyManager {
private:
TopologyManager();
static TopologyManager* manager;
Entity* selected_entity = nullptr;
TopologyCondition topology_condition = TopologyCondition::NoTopology;
DrawingStage drawing_stage = DrawingStage::Drawing;
int neighbourhood_threshhold = 5;
public:
static TopologyManager* getManager();
void setSelectedEntity(Entity* entity);
void setTopologyCondition(TopologyCondition condition);
TopologyCondition getTopologyCondition();
Entity* getSelectedEntity();
DrawingStage getDrawingStage();
void setDrawingStage(DrawingStage stage);
int getNeighbourhoodThreshold();
void setNeighbourhoodThreshold(int threshold);
bool isAcceptedTopology(LineEntity* entity);
bool isAcceptedTopology(PointEntity* entity);
bool isAcceptedTopology(PolygonEntity* entity);
bool isAcceptedTopology(PolylineEntity* entity);
};