first commit

This commit is contained in:
Jérôme Delacotte
2025-03-06 11:15:32 +01:00
commit 7b30d6e298
5276 changed files with 2108927 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
#ifndef Cube_h
#define Cube_h
#include <Arduino.h>
#include "Ecran.h"
typedef struct
{
int x, y;
} point;
// Assign human-readable names to some common 16-bit color values:
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
class Cube {
public :
Cube(Ecran * ecran);
void draw();
private:
void QuickSort(int deb, int fin);
public :
float x, y;
private:
Ecran * ecran;
int key;
float a = 0.0, b = 0.0;
//float ax,ay,az;
short lx[8] = {1, 1, 1, 1, -1, -1, -1, -1};
short ly[8] = {1, 1, -1, -1, 1, 1, -1, -1};
short lz[8] = {1, -1, 1, -1, 1, -1, 1, -1};
float lxn[8], lyn[8], lzn[8];
float xd[8], yd[8];
float c = 1.0;
float xt, yt, zt;
float mr[3][3];
float znm;
int face[6][4] = {{4, 0, 1, 5}, {1, 0, 2, 3}, {5, 1, 3, 7}, {4, 5, 7, 6}, {0, 4, 6, 2}, {3, 2, 6, 7}};
int facec[6] = {10, 20, 30, 20, 30, 10};
point points[10];
// Quick sort
int tri[12];
int zface[12];
};
#endif