Files
viseq/src/edge.h
T

37 lines
688 B
C++
Raw Normal View History

#pragma once
2024-11-01 14:08:27 +01:00
#include "datatypes.h"
#include "graph-item.h"
class Edge : public GraphItem{
public:
Edge() {}
2024-11-01 14:08:27 +01:00
Edge(SPTR_Node start, SPTR_Node end) : start(start), end(end) {}
2024-11-01 14:08:27 +01:00
SPTR_Node start;
SPTR_Node end;
bool pass_forward = true;
bool pass_backward = true;
bool active = false;
bool config = false;
bool split = false;
float connector_offset = 8.0f;
float switches_offset = 25.0f;
virtual bool GActive() {return active;}
2024-11-01 14:08:27 +01:00
SPTR_Node getNextNode(SPTR_Node origin){
return start == origin ? end : start;
}
void draw(Vec2Df mouse_pos, Camera2D cam) {
}
};
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Edge, id, start, end, pass_forward, pass_backward)