fixing stuff
This commit is contained in:
@@ -2,67 +2,65 @@
|
||||
#define VOXELSPACE_H
|
||||
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include "lib/djstdlib/core.h"
|
||||
|
||||
namespace Voxel {
|
||||
constexpr int NUM_ROTS_3D = 24;
|
||||
constexpr int NUM_ROTS_3D = 24;
|
||||
|
||||
struct Extrema {
|
||||
int xMax;
|
||||
int xMin;
|
||||
int yMax;
|
||||
int yMin;
|
||||
int zMax;
|
||||
int zMin;
|
||||
};
|
||||
struct Extrema {
|
||||
int xMax;
|
||||
int xMin;
|
||||
int yMax;
|
||||
int yMin;
|
||||
int zMax;
|
||||
int zMin;
|
||||
};
|
||||
|
||||
struct Space {
|
||||
uint64_t space;
|
||||
int dim_x;
|
||||
int dim_y;
|
||||
int dim_z;
|
||||
};
|
||||
struct Space {
|
||||
uint64 space;
|
||||
int dim_x;
|
||||
int dim_y;
|
||||
int dim_z;
|
||||
};
|
||||
|
||||
auto newIndexRotX(Space *space, int x, int y, int z) -> int;
|
||||
int newIndexRotX(Space *space, int x, int y, int z);
|
||||
|
||||
auto newIndexRotY(Space *space, int x, int y, int z) -> int;
|
||||
int newIndexRotY(Space *space, int x, int y, int z);
|
||||
|
||||
auto newIndexRotZ(Space *space, int x, int y, int z) -> int;
|
||||
int newIndexRotZ(Space *space, int x, int y, int z);
|
||||
|
||||
auto toggle(uint64_t space, int index) -> uint64_t;
|
||||
uint64 toggle(uint64 space, int index);
|
||||
|
||||
auto set(uint64_t space, int index, bool val) -> uint64_t;
|
||||
uint64 set(uint64 space, int index, bool val);
|
||||
|
||||
auto collides(Space *a, Space *b) -> bool;
|
||||
auto collides(uint64_t a, uint64_t b) -> bool;
|
||||
bool collides(Space *a, Space *b);
|
||||
bool collides(uint64 a, uint64 b);
|
||||
|
||||
auto add(Space *a, Space *b) -> Space;
|
||||
Space add(Space *a, Space *b);
|
||||
|
||||
auto filledAt(Space *space, int x, int y, int z) -> bool;
|
||||
bool filledAt(Space *space, int x, int y, int z);
|
||||
|
||||
auto getExtrema(Space *space) -> Extrema;
|
||||
Extrema getExtrema(Space *space);
|
||||
|
||||
auto cullEmptySpace(Space *space) -> void;
|
||||
void cullEmptySpace(Space *space);
|
||||
|
||||
auto isMatch(Space *a, Space *b) -> bool;
|
||||
bool isMatch(Space *a, Space *b);
|
||||
|
||||
auto rotate90X(Space *space) -> void;
|
||||
void rotate90X(Space *space);
|
||||
|
||||
auto rotate90Y(Space *space) -> void;
|
||||
void rotate90Y(Space *space);
|
||||
|
||||
auto rotate90Z(Space *space) -> void;
|
||||
void rotate90Z(Space *space);
|
||||
|
||||
auto pushNewUniqueSpins(std::vector<Space> *existingSpaces, Space* spaceToSpin) -> void;
|
||||
void pushNewUniqueSpins(std::vector<Space> *existingSpaces, Space* spaceToSpin);
|
||||
|
||||
auto getUniqueRotations(Space *space) -> std::vector<Space>;
|
||||
std::vector<Space> getUniqueRotations(Space *space);
|
||||
|
||||
auto getAllRotations(Space *space) -> std::vector<Space>;
|
||||
std::vector<Space> getAllRotations(Space *space);
|
||||
|
||||
auto getAllPositionsInPrism(Space *space, int prism_dims[3]) -> std::vector<uint64_t>;
|
||||
std::vector<uint64> getAllPositionsInPrism(Space *space, int prism_dims[3]);
|
||||
|
||||
auto getAllPermutationsInPrism(Space *space, int prism_dims[3]) -> std::vector<uint64_t>;
|
||||
std::vector<uint64> getAllPermutationsInPrism(Space *space, int prism_dims[3]);
|
||||
|
||||
auto size(uint64_t space) -> int;
|
||||
}
|
||||
int size(uint64 space);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user