espleaf/include/corner.h

25 lines
558 B
C++

#pragma once
#include <FastLED.h>
#include <list>
#include "edge.h"
class Corner {
public:
Edge* e1;
Edge* e2;
Corner(Edge* e1, Edge* e2);
std::list<uint16_t> _leds;
std::list<Corner*> _long_neighbours {};
std::list<Corner*> _short_neighbours {nullptr};
CRGB color = CRGB(0x000000);
CRGB source_color;
CRGB target_color;
bool effect_running = false;
uint8_t color_blend_state = 255;
uint16_t effect_id;
void loop();
void draw();
void blend_to(CRGB color, uint16_t effect_id=0);
void add_led(uint16_t led_id);
void merge_leds(Corner* c);
};