18 lines
656 B
C++
18 lines
656 B
C++
#include "planet.hpp"
|
|
|
|
namespace game {
|
|
|
|
glm::vec3 Planet::getColor() const
|
|
{
|
|
switch (material) {
|
|
case Material::Rock: return glm::vec3(0.4, 0.2, 0.1);
|
|
case Material::Metal: return glm::vec3(0.1, 0.1, 0.1);
|
|
case Material::Sand: return glm::vec3(0.6, 0.6, 0.3);
|
|
case Material::Gas: return glm::vec3(0.8, 0.5, 0.2);
|
|
case Material::Ice: return glm::vec3(0.7, 0.8, 1.0);
|
|
case Material::Water: return glm::vec3(0.2, 0.7, 1.0);
|
|
case Material::Sun: return glm::vec3(1.0, 1.0, 0.8);
|
|
default: return glm::vec3(1.0, 0.0, 1.0); // diagnostic color
|
|
}
|
|
}
|
|
}
|