2022-11-10 19:47:39 +01:00
|
|
|
#ifndef GLOBALS_H
|
|
|
|
#define GLOBALS_H
|
|
|
|
|
|
|
|
#include "camera.hpp"
|
2022-11-20 20:22:56 +01:00
|
|
|
#include "chunk.hpp"
|
2022-11-10 19:47:39 +01:00
|
|
|
|
|
|
|
#ifdef GLOBALS_DEFINER
|
|
|
|
#define extr
|
|
|
|
#else
|
|
|
|
#define extr extern
|
|
|
|
#endif
|
|
|
|
|
2023-03-23 21:17:06 +01:00
|
|
|
#define RENDER_DISTANCE 16
|
2022-11-10 19:47:39 +01:00
|
|
|
|
|
|
|
extr Camera theCamera;
|
2023-10-03 22:41:06 +02:00
|
|
|
// the cube spans in both directions, to each axis has to be multiplied by 2. 2^3=8
|
|
|
|
constexpr int chunks_volume = 8*(RENDER_DISTANCE*RENDER_DISTANCE*RENDER_DISTANCE);
|
2023-07-18 20:03:59 +02:00
|
|
|
extr bool wireframe;
|
2022-11-10 19:47:39 +01:00
|
|
|
|
2023-07-23 11:49:40 +02:00
|
|
|
extr float sines[360];
|
|
|
|
extr float cosines[360];
|
|
|
|
|
2022-11-10 19:47:39 +01:00
|
|
|
extr uint32_t MORTON_XYZ_ENCODE[CHUNK_SIZE][CHUNK_SIZE][CHUNK_SIZE];
|
2022-11-20 20:22:56 +01:00
|
|
|
extr uint32_t MORTON_XYZ_DECODE[CHUNK_VOLUME][3];
|
2022-11-10 19:47:39 +01:00
|
|
|
extr uint32_t HILBERT_XYZ_ENCODE[CHUNK_SIZE][CHUNK_SIZE][CHUNK_SIZE];
|
2022-11-20 20:22:56 +01:00
|
|
|
extr uint32_t HILBERT_XYZ_DECODE[CHUNK_VOLUME][3];
|
2022-11-10 19:47:39 +01:00
|
|
|
|
2023-03-23 21:17:06 +01:00
|
|
|
#endif
|