X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FPlanet.hpp;h=af3b512aea6b058bc97b4dadb7435b0bc65d4347;hb=bcf776b6d51aeb9147bde32da8dd0768b10db993;hp=efc804dae6a88e91cbbacafcbfd2c3cd38798bab;hpb=592c7e6d616f2cfacfd4948e17a4bb72f6444488;p=blobs.git diff --git a/src/world/Planet.hpp b/src/world/Planet.hpp index efc804d..af3b512 100644 --- a/src/world/Planet.hpp +++ b/src/world/Planet.hpp @@ -3,19 +3,20 @@ #include "Body.hpp" +#include "Set.hpp" #include "Tile.hpp" #include "../graphics/glm.hpp" #include "../graphics/SimpleVAO.hpp" #include -#include +#include #include namespace blobs { namespace world { -struct Tile; +class TileType; /// A planet has six surfaces, numbered 0 to 5, each filled with /// sidelength² tiles. @@ -63,12 +64,12 @@ public: glm::dvec3 TileCenter(int surface, int x, int y) const noexcept; - void BuildVAOs(); + void BuildVAO(const Set &); void Draw(app::Assets &, graphics::Viewport &) override; private: int sidelength; - std::unique_ptr tiles; + std::vector tiles; struct Attributes { glm::vec3 position; @@ -78,8 +79,8 @@ private: }; -void GenerateEarthlike(Planet &) noexcept; -void GenerateTest(Planet &) noexcept; +void GenerateEarthlike(const Set &, Planet &) noexcept; +void GenerateTest(const Set &, Planet &) noexcept; } }