forked from Zylann/godot_voxel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube_tables.h
36 lines (21 loc) · 896 Bytes
/
cube_tables.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef CUBE_TABLES_H
#define CUBE_TABLES_H
#include <vector3.h>
#include "vector3i.h"
#include "voxel.h"
namespace CubeTables {
const unsigned int CORNER_COUNT = 8;
const unsigned int EDGE_COUNT = 12;
extern const Vector3 g_corner_position[CORNER_COUNT];
extern const int g_side_quad_triangles[Voxel::SIDE_COUNT][6];
extern const unsigned int g_side_coord[Voxel::SIDE_COUNT];
extern const unsigned int g_side_sign[Voxel::SIDE_COUNT];
extern const Vector3i g_side_normals[Voxel::SIDE_COUNT];
extern const unsigned int g_side_corners[Voxel::SIDE_COUNT][4];
extern const unsigned int g_side_edges[Voxel::SIDE_COUNT][4];
extern const Vector3i g_corner_inormals[CORNER_COUNT];
extern const Vector3i g_edge_inormals[EDGE_COUNT];
extern const unsigned int g_edge_corners[EDGE_COUNT][2];
extern const Vector3i g_moore_neighboring_3d[26];
} // namespace CubeTables
#endif // CUBE_TABLES_H