compiling but mouse interaction is dead
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include "edge.h"
|
||||
|
||||
#include <memory>
|
||||
#include "node.h"
|
||||
|
||||
namespace VISEQ::GRAPH::EDGES {
|
||||
bool Edge::GActive() {return active;}
|
||||
|
||||
EdgeType Edge::getEdgeType() const {return edgeType;}
|
||||
|
||||
std::weak_ptr<NODES::Node> Edge::getNextNode(std::weak_ptr<NODES::Node> origin){
|
||||
return start.lock() == origin.lock() ? end : start;
|
||||
}
|
||||
|
||||
void Edge::draw(Vec2Df mouse_pos, Camera2D cam) {}
|
||||
|
||||
void to_json(json& j, const VISEQ::GRAPH::EDGES::Edge& E){
|
||||
j = json{{"id",E.id}, {"start", E.start.lock()->id}, {"end",E.end.lock()->id}, {"pass_forward",E.pass_forward}, {"pass_backward", E.pass_backward}};
|
||||
}
|
||||
|
||||
void from_json(const json& j, Edge& E){
|
||||
j.at("id").get_to(E.id);
|
||||
j.at("pass_forward").get_to(E.pass_forward);
|
||||
j.at("pass_backward").get_to(E.pass_backward);
|
||||
}
|
||||
|
||||
void to_json(json& j, const VISEQ::GRAPH::EDGES::SPTR_Edge& E){
|
||||
j = *E;
|
||||
}
|
||||
|
||||
void from_json(const json& j, VISEQ::GRAPH::EDGES::SPTR_Edge& E){
|
||||
E.reset(new Edge(j.get<Edge>()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user