#pragma once #include #include "utils/globals.hpp" #include "entities/player.hpp" #include "rendering/floor_surface.hpp" #include "rendering/gl_renderer.hpp" #include "wall/wall.hpp" namespace Nimbin { struct SweepResult { bool hit_x{}; bool hit_y{}; bool hit_z{}; Vec3 pos; Vec3 vel; }; namespace Floor { struct Surface; } class World { Wall::Surfaces _wall_surfaces; cpputils::unique_ptr _floor_surface; public: World(); void draw(GlRenderer& gl, const Camera& camera, const Light& light) const; PlayerCollision resolve_Player(const Player& player) const; Vec3 get_SpawnPoint() const; template inline static T get_FloorY() { return static_cast(-Config::Game::world_box_scale); } template inline static T get_BoxScale() { return static_cast(Config::Game::world_box_scale); } }; } // namespace Nimbin