voxelman/meshers/cubic_mesher/voxel_mesher_cubic.h

62 lines
2.1 KiB
C
Raw Normal View History

2019-07-13 22:03:23 +02:00
#ifndef VOXEL_MESHER_CUBIC_H
#define VOXEL_MESHER_CUBIC_H
#include "../voxel_mesher.h"
class VoxelMesherCubic : public VoxelMesher {
GDCLASS(VoxelMesherCubic, VoxelMesher);
public:
enum VoxelNeighbours {
VOXEL_NEIGHBOUR_NONE = 0,
VOXEL_NEIGHBOUR_LEFT = 1 << 0,
VOXEL_NEIGHBOUR_RIGHT = 1 << 1,
VOXEL_NEIGHBOUR_FRONT = 1 << 2,
VOXEL_NEIGHBOUR_BACK = 1 << 3,
VOXEL_NEIGHBOUR_TOP = 1 << 4,
VOXEL_NEIGHBOUR_BOTTOM = 1 << 5,
VOXEL_NEIGHBOUR_LEFT_FRONT = 1 << 6,
VOXEL_NEIGHBOUR_LEFT_BACK = 1 << 7,
VOXEL_NEIGHBOUR_RIGHT_FRONT = 1 << 8,
VOXEL_NEIGHBOUR_RIGHT_BACK = 1 << 9,
VOXEL_NEIGHBOUR_TOP_LEFT = 1 << 10,
VOXEL_NEIGHBOUR_TOP_RIGHT = 1 << 11,
VOXEL_NEIGHBOUR_TOP_FRONT = 1 << 12,
VOXEL_NEIGHBOUR_TOP_BACK = 1 << 13,
VOXEL_NEIGHBOUR_BOTTOM_LEFT = 1 << 14,
VOXEL_NEIGHBOUR_BOTTOM_RIGHT = 1 << 15,
VOXEL_NEIGHBOUR_BOTTOM_FRONT = 1 << 16,
VOXEL_NEIGHBOUR_BOTTOM_BACK = 1 << 17,
VOXEL_NEIGHBOUR_BOTTOM_LEFT_FRONT = 1 << 18,
VOXEL_NEIGHBOUR_BOTTOM_LEFT_BACK = 1 << 19,
VOXEL_NEIGHBOUR_BOTTOM_RIGHT_FRONT = 1 << 20,
VOXEL_NEIGHBOUR_BOTTOM_RIGHT_BACK = 1 << 21,
VOXEL_NEIGHBOUR_TOP_LEFT_FRONT = 1 << 22,
VOXEL_NEIGHBOUR_TOP_LEFT_BACK = 1 << 23,
VOXEL_NEIGHBOUR_TOP_RIGHT_FRONT = 1 << 24,
VOXEL_NEIGHBOUR_TOP_RIGHT_BACK = 1 << 25,
VOXEL_FULL_NEIGHBOURS_CROSS = VOXEL_NEIGHBOUR_LEFT | VOXEL_NEIGHBOUR_RIGHT | VOXEL_NEIGHBOUR_BACK | VOXEL_NEIGHBOUR_FRONT | VOXEL_NEIGHBOUR_TOP | VOXEL_NEIGHBOUR_BOTTOM, // | VOXEL_NEIGHBOUR_LEFT_BACK | VOXEL_NEIGHBOUR_LEFT_FRONT | VOXEL_NEIGHBOUR_RIGHT_BACK | VOXEL_NEIGHBOUR_RIGHT_FRONT;
VOXEL_FULL_SIDE_NEIGHBOURS = VOXEL_NEIGHBOUR_LEFT | VOXEL_NEIGHBOUR_RIGHT | VOXEL_NEIGHBOUR_BACK | VOXEL_NEIGHBOUR_FRONT,
VOXEL_FULL_SIDE_NEIGHBOURS_TOP = VOXEL_NEIGHBOUR_LEFT | VOXEL_NEIGHBOUR_RIGHT | VOXEL_NEIGHBOUR_BACK | VOXEL_NEIGHBOUR_FRONT | VOXEL_NEIGHBOUR_TOP,
VOXEL_FULL_SIDE_NEIGHBOURS_DOWN = VOXEL_NEIGHBOUR_LEFT | VOXEL_NEIGHBOUR_RIGHT | VOXEL_NEIGHBOUR_BACK | VOXEL_NEIGHBOUR_FRONT | VOXEL_NEIGHBOUR_BOTTOM,
};
2019-07-13 22:03:23 +02:00
VoxelMesherCubic();
protected:
static void _bind_methods();
};
VARIANT_ENUM_CAST(VoxelMesherCubic::VoxelNeighbours);
2019-07-13 22:03:23 +02:00
#endif