#ifndef __LedCube__
#define __LedCube__

#include "CubeRegister.h"
#define DEFAULT_FRAMERATE 30
#define DEFAULT_SHADES 8

#define DEFAULT_CUBESIZE 5

class LedCube {
  public:
    LedCube(unsigned char size, unsigned char shades, CubeRegister output);
    ~LedCube();

    void start(void);
    void reset(void);
    void draw_layer();
    void framerate(unsigned char framerate);
    unsigned char shades(void);
    unsigned char size(void);

    void toSerial(void);

    unsigned char pixel(unsigned char x, unsigned char y, unsigned char z);
    void pixel(unsigned char x, unsigned char y, unsigned char z, unsigned char value);


    void fill(unsigned char brightness);
  //  void dim(unsigned char diff);
    void shade(char diff);
    void rotate_cover(int steps, unsigned int frame_delay);
    void rotate(int steps, unsigned int frame_delay);


  private:
    const unsigned char _cubesize;
    const unsigned char _shades;
    unsigned char _framerate;
    CubeRegister myRegister;

    volatile unsigned char layer = 0;
    volatile unsigned char level = 0;
    unsigned char  ***pixels;
};

extern LedCube myCube;


#endif  // __LedCube__
