G.U.L.L.S/include/FluidColorMatrix.h

41 lines
887 B
C++

#ifndef FLUIDCOLORMATRIX_H
#define FLUIDCOLORMATRIX_H
#include "MatrixAnimation.h"
enum FluidColorType {
PIXEL_BY_PIXEL_FLUIDCOLOR,
HORIZONTAL_FLUIDCOLOR,
VERTICAL_FLUIDCOLOR
};
enum FluidColorResolution {
FULL_FLUIDCOLOR,
HALF_FLUIDCOLOR,
QUATER_FLUIDCOLOR,
EIGHTH_FLUIDCOLOR
};
class FluidColorMatrix : public MatrixAnimation {
public:
FluidColorMatrix(LEDHAL2D* _matrix, char* _refName, long _updateTime,
FluidColorType _type, FluidColorResolution _resolution) : MatrixAnimation(_matrix,
_refName, _updateTime), type(_type), resolution(_resolution), colorShifter(0) {}
virtual ~FluidColorMatrix() { delete[] colors; }
void initialize();
void execute();
private:
uint16_t
colorShifter;
CRGB*
colors;
uint8_t
numColors;
FluidColorType
type;
FluidColorResolution
resolution;
};
#endif