#ifndef WORLD_H__ #define WORLD_H__ #include "define.h" #include "chunk.h" #include "array2d.h" #include "vector3.h" #include "transformation.h" class World { public: World(); ~World(); Array2d& GetChunks(); Chunk* ChunkAt(float x, float y, float z) const; Chunk* ChunkAt(const Vector3f& pos) const; BlockType BlockAt(float x, float y, float z, BlockType defaultBlockType = BTYPE_AIR) const; BlockType BlockAt(const Vector3f& pos, BlockType defaultBlockType = BTYPE_AIR) const; private: Array2d m_chunks = Array2d(VIEW_DISTANCE, VIEW_DISTANCE); int m_center[2] = {0, 0}; }; #endif // WORLD_H__