#include "Body.hpp"
+#include "Set.hpp"
#include "Tile.hpp"
#include "../graphics/glm.hpp"
#include "../graphics/SimpleVAO.hpp"
namespace blobs {
namespace world {
-class TileSet;
+class TileType;
/// A planet has six surfaces, numbered 0 to 5, each filled with
/// sidelength² tiles.
return tiles[IndexOf(surface, x, y)];
}
+ const TileType &TypeAt(int surface, int x, int y) const;
+
/// Convert coordinates into a tile index.
int IndexOf(int surface, int x, int y) const {
assert(0 <= surface && surface <= 5);
glm::dvec3 TileCenter(int surface, int x, int y) const noexcept;
- void BuildVAO(const TileSet &);
+ void BuildVAO(const Set<TileType> &);
void Draw(app::Assets &, graphics::Viewport &) override;
private:
};
-void GenerateEarthlike(const TileSet &, Planet &) noexcept;
-void GenerateTest(const TileSet &, Planet &) noexcept;
+void GenerateEarthlike(const Set<TileType> &, Planet &) noexcept;
+void GenerateTest(const Set<TileType> &, Planet &) noexcept;
}
}