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
+7
View File
@@ -8,6 +8,7 @@ class Node;
class Edge : public GraphItem{
public:
Edge() {}
Edge(std::shared_ptr<Node> start, std::shared_ptr<Node> end) : start(start), end(end) {}
std::shared_ptr<Node> start;
@@ -24,7 +25,13 @@ class Edge : public GraphItem{
float connector_offset = 8.0f;
float switches_offset = 25.0f;
virtual bool GActive() {return active;}
std::shared_ptr<Node> getNextNode(std::shared_ptr<Node> origin){
return start == origin ? end : start;
}
void draw(Vec2D<float> mouse_pos, Camera2D cam) {
}
};