#pragma once #include "object.hpp" #include namespace game { class Planet : public Object { public: /** * Planets are build out of one material. * TODO: support mixture or multiple material per planet. */ enum class Material { Rock=0, Metal=1, Sand=2, Gas=3, Ice=4, Water=5, Sun=6 }; Planet(size_t id, const glm::vec2 &pos, float r, Material mat=Material::Rock) : Object(id, pos), material(mat), radius(r), seed(rand()) { } glm::vec3 getColor() const; // for rendering and physics (can fly through sun and outer gas planets) Material material; // just for rendering variation float radius; int seed; }; }