finally all working

This commit is contained in:
Daniel Ledda
2022-12-27 06:24:36 +01:00
parent bd52c9a93f
commit 82906bd3de
6 changed files with 501 additions and 204 deletions

View File

@@ -5,6 +5,8 @@
#include <cstdint>
namespace Voxel {
constexpr int NUM_ROTS_3D = 24;
struct Extrema {
int xMax;
int xMin;
@@ -16,16 +18,16 @@ namespace Voxel {
struct Space {
uint64_t space;
int dims[3];
int dim_x;
int dim_y;
int dim_z;
};
auto index(int dims[3], int x, int y, int z) -> int;
auto newIndexRotX(int dims[3], int x, int y, int z) -> int;
auto newIndexRotX(Space *space, int x, int y, int z) -> int;
auto newIndexRotY(int dims[3], int x, int y, int z) -> int;
auto newIndexRotY(Space *space, int x, int y, int z) -> int;
auto newIndexRotZ(int dims[3], int x, int y, int z) -> int;
auto newIndexRotZ(Space *space, int x, int y, int z) -> int;
auto toggle(uint64_t space, int index) -> uint64_t;
@@ -36,9 +38,9 @@ namespace Voxel {
auto add(Space *a, Space *b) -> Space;
auto filledAt(uint64_t space, int dims[3], int x, int y, int z) -> bool;
auto filledAt(Space *space, int x, int y, int z) -> bool;
auto getExtrema(uint64_t space, int dims[3]) -> Extrema;
auto getExtrema(Space *space) -> Extrema;
auto cullEmptySpace(Space *space) -> void;
@@ -54,7 +56,9 @@ namespace Voxel {
auto getUniqueRotations(Space *space) -> std::vector<Space>;
auto getAllPositionsInPrism(uint64_t space, int space_dims[3], int prism_dims[3]) -> std::vector<uint64_t>;
auto getAllRotations(Space *space) -> std::vector<Space>;
auto getAllPositionsInPrism(Space *space, int prism_dims[3]) -> std::vector<uint64_t>;
auto getAllPermutationsInPrism(Space *space, int prism_dims[3]) -> std::vector<uint64_t>;