KlassischeKeplerKriege/game/state/planet.hpp

40 lines
792 B
C++
Raw Normal View History

#pragma once
#include "object.hpp"
2016-09-27 21:29:26 +00:00
#include <cstdlib>
namespace game {
class Planet : public Object {
public:
2016-09-27 21:29:26 +00:00
/**
* Planets are build out of one material.
* TODO: support mixture or multiple material per planet.
*/
enum class Material {
Rock,
Metal,
Sand,
Gas,
Ice,
Water,
Sun
};
Planet(const glm::vec2 &pos, float r) : Planet(pos, r, Material::Rock)
{
}
Planet(const glm::vec2 &pos, float r, Material mat)
: Object(pos, r)
, material(mat)
, seed(rand())
{
}
2016-09-27 21:29:26 +00:00
// nice for rendering attributes
Material material;
int seed;
};
}