OpenMiner/include/world/World.hpp

45 lines
851 B
C++
Raw Normal View History

2014-12-18 07:02:48 +01:00
/*
* =====================================================================================
*
* Filename: World.hpp
*
* Description:
*
* Version: 1.0
* Created: 16/12/2014 15:28:02
* Revision: none
* Compiler: gcc
*
* Author: Quentin BAZIN, <quent42340@gmail.com>
* Company:
*
* =====================================================================================
*/
#ifndef WORLD_HPP_
#define WORLD_HPP_
#include <memory>
#include "Chunk.hpp"
class World {
public:
World();
~World();
void draw(Shader &shader, const glm::mat4 &pv);
2014-12-20 15:13:51 +01:00
Chunk *getChunk(s32 x, s32 z);
2014-12-18 07:02:48 +01:00
2014-12-23 16:15:44 +01:00
// Render distance in chunks
static const u16 renderDistance = 16;
2014-12-18 07:02:48 +01:00
private:
s32 m_width;
s32 m_depth;
std::vector<std::unique_ptr<Chunk>> m_chunks;
};
#endif // WORLD_HPP_