2024-10-31 01:43:00 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "graph-item.h"
|
2024-11-03 03:48:49 +01:00
|
|
|
#include <memory>
|
|
|
|
|
#include "node.h"
|
2024-10-31 01:43:00 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
using namespace VISEQ::GRAPH;
|
2024-10-31 01:43:00 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
namespace VISEQ::GRAPH::EDGES {
|
|
|
|
|
class Edge : public GraphItem{
|
2024-10-31 01:43:00 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
public:
|
|
|
|
|
Edge() {}
|
|
|
|
|
Edge(std::shared_ptr<NODES::Node> start, std::shared_ptr<NODES::Node> end) : start(start), end(end) {}
|
2024-10-31 01:43:00 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
std::shared_ptr<NODES::Node> start;
|
|
|
|
|
std::shared_ptr<NODES::Node> end;
|
2024-10-31 01:43:00 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
bool pass_forward = true;
|
|
|
|
|
bool pass_backward = true;
|
|
|
|
|
|
|
|
|
|
bool active = false;
|
|
|
|
|
bool config = false;
|
|
|
|
|
bool split = false;
|
2024-11-01 02:38:47 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
float connector_offset = 8.0f;
|
|
|
|
|
float switches_offset = 25.0f;
|
2024-11-01 02:38:47 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
virtual bool GActive() {return active;}
|
2024-11-02 15:52:16 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
std::shared_ptr<NODES::Node> getNextNode(std::shared_ptr<NODES::Node> origin){
|
|
|
|
|
return start == origin ? end : start;
|
|
|
|
|
}
|
2024-11-02 23:12:38 +01:00
|
|
|
|
2024-11-03 03:48:49 +01:00
|
|
|
void draw(Vec2Df mouse_pos, Camera2D cam) {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef std::shared_ptr<Edge> SPTR_Edge;
|
|
|
|
|
typedef std::vector<SPTR_Edge> VEC_SPTR_Edge;
|
|
|
|
|
}
|