#pragma once #include "text/token.hpp" #include "utils/config.hpp" #include "utils/globals.hpp" namespace Nimbin { namespace Text { class Handler; } namespace Wall { enum class Position : uint8_t { PosX, NegX, PosZ, NegZ }; enum class Role : uint8_t { Program, Editor, Info, Compiler }; class Surface; struct Drop; struct Label; struct Transform; } namespace Wall { Role role_Of (Position p); Position position_Of (Role r); Vec3 inward_Normal (Wall::Position pos); Drop attach_ToNearestWall(Text::TokenPtr src); void show_TokenInfo (Text::Handler& info, const std::string& token_text); float tilt_TwardEye (const Vec3& text_pos, const Vec3& eye_pos); struct Transform { Position wall_position; Vec3 position; float yaw; }; Transform get_Transform (Role role, float world_scale); Vec3 get_Position (Role role, float world_scale); class Surfaces { public: struct Quad { DynArray verts; DynArray indices; Role role; SDL_FColor color; bool is_editor; }; void generate(float world_scale); void draw(GlRenderer& gl, const Camera& cam, const Light& light) const; private: DynArray _walls; }; struct Drop { Role role; Text::TokenPtr token; }; } // namespace Wall } // namespace Nimbin