conversion to smart pointers done but still buggy

This commit is contained in:
Sebastian
2024-11-01 02:38:47 +01:00
parent c0eb7c98ba
commit 19b2c9549f
15 changed files with 389 additions and 524 deletions
+11 -3
View File
@@ -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) {}
};