#ifndef FACE_H #define FACE_H #include class Face { public: int getX() const; int getY() const; int getZ() const; Face& getOpposite() const; const char* getName() const; int getCullData() const; static void forEach(void* data, void (*fun) (Face&, void*)); static Face& UP; static Face& DOWN; static Face& NORTH; static Face& SOUTH; static Face& EAST; static Face& WEST; static int getCullData(bool up, bool down, bool north, bool south, bool east, bool west); private: Face(int index, int offsetX, int offsetY, int offsetZ, int cullBit, const char* name); static Face FACES[6]; int index; int offsetX; int offsetY; int offsetZ; int cullBit; const char* name; }; bool operator==(const Face& l, const Face& r); bool operator!=(const Face& l, const Face& r); std::ostream& operator<<(std::ostream& os, const Face& f); #endif