#pragma once #include "connector.h" #include "graph-item.h" #include #include "node.h" using namespace VISEQ::GRAPH; namespace VISEQ::GRAPH::EDGES { class Edge : public GraphItem{ public: Edge() {} Edge(std::weak_ptr start, std::weak_ptr end) : start(start), end(end) {} std::weak_ptr start; std::weak_ptr end; std::weak_ptr start_conn; std::weak_ptr end_conn; EdgeType edgeType; bool pass_forward = true; bool pass_backward = true; bool active = false; bool config = false; bool split = false; float speed = 0; float bpm = 120.0f; float connector_offset = 8.0f; float switches_offset = 25.0f; virtual bool GActive() {return active;} virtual EdgeType getEdgeType() const {return edgeType;} std::weak_ptr getNextNode(std::weak_ptr origin){ return start.lock() == origin.lock() ? end : start; } void draw(Vec2Df mouse_pos, Camera2D cam) {} }; typedef std::shared_ptr SPTR_Edge; typedef std::weak_ptr WPTR_Edge; typedef std::vector VEC_SPTR_Edge; typedef std::vector VEC_WPTR_Edge; }