#pragma once #include #include "entities/player.hpp" #include "entities/camera.hpp" #define MAP_BOX_SCALE 16 #define MAP_BOX_EDGES_LEN (12 + MAP_BOX_SCALE * 2) struct Edge { Vec3 a; Vec3 b; }; struct SweepResult { Vec3 pos; Vec3 vel; bool hit_x{}; bool hit_y{}; bool hit_z{}; }; class World { public: World(); PlayerCollision resolvePlayer(const Player& player) const; void draw(SDL_Renderer* renderer, const Camera& camera) const; Vec3 spawnPoint() const; float scale() const; private: void initEdges(); float world_scale{16.0f}; std::array edges{}; };