conversion to smart pointers done but still buggy
This commit is contained in:
+11
-3
@@ -14,8 +14,10 @@ class Node : public Movable, public GraphItem{
|
||||
Node() {}
|
||||
Node(float x, float y) : Movable(Vec2D<float>(x, y), 0.0f) {}
|
||||
Node(Vec2D<float> p) : Movable(p, 0.0f) {}
|
||||
|
||||
Node *neighbor = nullptr;
|
||||
|
||||
NodeType nodeType;
|
||||
|
||||
std::shared_ptr<Node> neighbor;
|
||||
|
||||
std::vector<std::shared_ptr<Edge>> connections;
|
||||
|
||||
@@ -24,5 +26,11 @@ class Node : public Movable, public GraphItem{
|
||||
float radius = 15.0f;
|
||||
bool config = false;
|
||||
|
||||
virtual void setMode(int mode) = 0;
|
||||
virtual NodeType getNodeType() {return nodeType;}
|
||||
|
||||
virtual void SMode(int mode) {};
|
||||
virtual int GGate() {return 0;};
|
||||
virtual int GActive() {return 0;};
|
||||
virtual void trigger() {};
|
||||
void draw(Vec2D<float> mouse_pos, Camera2D cam) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user