Files
viseq/src/signal.h
T

51 lines
1.0 KiB
C++
Raw Normal View History

2024-10-09 02:01:23 +02:00
#pragma once
#include <raylib.h>
2024-10-09 02:01:23 +02:00
#include "moveable.h"
#include "node.h"
#include "edge.h"
2024-11-03 03:48:49 +01:00
using namespace VISEQ::GRAPH;
2024-10-09 02:01:23 +02:00
2024-11-03 03:48:49 +01:00
namespace VISEQ::SIGNAL {
class Signal : public BASE::Movable{
public:
Signal() {}
2024-11-03 03:48:49 +01:00
Signal(Vec2Df position, float r, float _speed, Color color) : Movable(position, Vec2Df(0,0), _speed), radius(r), color(color) {}
2024-12-03 01:25:49 +01:00
NODES::WPTR_Node next;
NODES::WPTR_Node last;
EDGES::WPTR_Edge edge;
2024-10-24 21:05:05 +02:00
2024-12-03 01:25:49 +01:00
NODES::WPTR_Node start;
2024-10-09 02:01:23 +02:00
2024-11-03 03:48:49 +01:00
bool at_target = false;
bool run = true;
2024-10-09 02:01:23 +02:00
float radius = 8.0f;
2024-11-03 03:48:49 +01:00
float multiplier = 1.0f;
2024-11-03 03:48:49 +01:00
Color color;
2024-11-07 00:01:54 +01:00
bool ui_edit_speed = false;
int midi_note_offset = 0;
int midi_cc_offset = 0;
2024-12-03 01:25:49 +01:00
2026-01-06 02:44:18 +01:00
void reset();
void toStart();
void update(double t_delta);
2026-01-12 00:16:36 +01:00
void draw(Vec2Df mouse, Camera2D cam);
friend void to_json(json& j, const Signal& S);
friend void from_json(const json& j, Signal& S);
friend void to_json(json& j, const std::shared_ptr<Signal>& S);
friend void from_json(const json& j, std::shared_ptr<Signal>& S);
2024-11-03 03:48:49 +01:00
};
}