12#include <unordered_map>
26 class TransparentChunk;
51 void UpdateChunk(
const int x_,
const int z_,
const std::optional<Botcraft::Chunk>& chunk);
52 void UpdateEntity(
const int id,
const std::vector<Face>& faces);
57 void SetPosOrientation(
const double x_,
const double y_,
const double z_,
const float yaw_,
const float pitch_);
61 void RenderFaces(
int* num_chunks_ =
nullptr,
int* num_rendered_chunks_ =
nullptr,
62 int* num_entities_ =
nullptr,
int* num_rendered_entities_ =
nullptr,
63 int* num_faces_ =
nullptr,
int* num_rendered_faces_ =
nullptr);
70 const std::vector<std::string>& texture_identifiers_,
71 const std::vector<unsigned int>& texture_multipliers_);
74 const std::vector<unsigned int>
GetColorModifier(
const int y,
const Biome* biome,
const Blockstate* blockstate,
const std::vector<bool>& use_tintindex)
const;
88 std::unordered_map<Position, std::shared_ptr<Chunk> >
chunks;
94 std::unordered_map<int, std::shared_ptr<Entity> >
entities;
std::shared_ptr< Camera > camera
void AddFace(const Position &block_pos, const Vector3< double > &offset, const Face &face_, const std::vector< std::string > &texture_identifiers_, const std::vector< unsigned int > &texture_multipliers_)
void UpdateChunk(const int x_, const int z_, const std::optional< Botcraft::Chunk > &chunk)
bool entities_faces_should_be_updated
const float DistanceToCamera(const Position &chunk) const
bool blocks_faces_should_be_updated
unsigned int atlas_texture
unsigned int view_uniform_buffer
std::mutex entities_mutex
std::mutex transparent_chunks_mutex
unsigned int section_height
void SetPosOrientation(const double x_, const double y_, const double z_, const float yaw_, const float pitch_)
std::shared_ptr< Camera > GetCamera()
std::unordered_map< int, std::shared_ptr< Entity > > entities
std::mutex m_mutex_camera
std::unordered_map< Position, std::shared_ptr< TransparentChunk > > transparent_chunks
const std::vector< unsigned int > GetColorModifier(const int y, const Biome *biome, const Blockstate *blockstate, const std::vector< bool > &use_tintindex) const
std::unordered_map< Position, std::shared_ptr< Chunk > > chunks
void UpdateEntity(const int id, const std::vector< Face > &faces)
void SetCameraProjection(const glm::mat4 &proj)
void RenderFaces(int *num_chunks_=nullptr, int *num_rendered_chunks_=nullptr, int *num_entities_=nullptr, int *num_rendered_entities_=nullptr, int *num_faces_=nullptr, int *num_rendered_faces_=nullptr)