heavy restructuring with smart pointers, not finished

This commit is contained in:
Sebastian
2024-10-31 01:43:00 +01:00
14 changed files with 3317 additions and 390 deletions
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include "graph-item.h"
#include <memory>
class Node;
class Edge : public GraphItem{
public:
Edge(std::shared_ptr<Node> start, std::shared_ptr<Node> end) : start(start), end(end) {}
std::shared_ptr<Node> start;
std::shared_ptr<Node> end;
bool pass_forward = true;
bool pass_backward = true;
bool active = false;
bool remove = false;
bool config = false;
bool split = false;
float connector_offset = 8.0f;
float switches_offset = 25.0f;
std::shared_ptr<Node> getNextNode(std::shared_ptr<Node> origin){
return start == origin ? end : start;
}
};