espleaf/include/node.h

22 lines
488 B
C
Raw Normal View History

2021-01-03 16:12:47 +00:00
#pragma once
#include <Arduino.h>
#include "config.h"
#include "edge.h"
#include "corner.h"
class Node {
private:
uint16_t _number;
2021-01-03 16:12:47 +00:00
public:
Node* neighbours[CORNERS_PER_PART];
Edge* edges[CORNERS_PER_PART];
Corner* _corners[CORNERS_PER_PART];
Node(uint16_t number);
2021-01-03 16:12:47 +00:00
Node* create_neighbour(uint8_t edge);
void blend_to(CRGB color, uint16_t effect_id=0, uint8_t effect_speed=0);
void set_color(CRGB color);
void infect(uint16_t level);
void step();
void draw();
2021-01-03 16:12:47 +00:00
};