sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/entities/world.hpp raw
#pragma once
#include <array>
#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> _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 <typename T = float>
inline static T
get_FloorY() { return static_cast<T>(-Config::Game::world_box_scale); }
template <typename T = float>
inline static T
get_BoxScale() { return static_cast<T>(Config::Game::world_box_scale); }
};
} // namespace Nimbin