31 lines
597 B
C++
31 lines
597 B
C++
|
|
#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;
|
||
|
|
}
|
||
|
|
};
|