X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fcreature%2FCreature.hpp;h=f36a2db1f1172770855a9eebdfc6554202689b6f;hp=f443e48940d2caa20da318c706f196f939a667fd;hb=2ab70a92ae39cebc6166ef15545ebcbd31a31c38;hpb=e22daa10d55c26f15a170ab76645e656e956901c diff --git a/src/creature/Creature.hpp b/src/creature/Creature.hpp index f443e48..f36a2db 100644 --- a/src/creature/Creature.hpp +++ b/src/creature/Creature.hpp @@ -57,6 +57,15 @@ public: Genome::Properties &GetProperties() noexcept { return properties; } const Genome::Properties &GetProperties() const noexcept { return properties; } + const Genome::PropertySet &CurProps() const noexcept { return properties.props[cur_prop]; } + const Genome::PropertySet &NextProps() const noexcept { return properties.props[cur_prop + 1]; } + + void BaseColor(const glm::dvec3 &c) noexcept { base_color = c; } + const glm::dvec3 &BaseColor() const noexcept { return base_color; } + + void HighlightColor(const glm::dvec3 &c) noexcept { highlight_color = c; } + glm::dvec4 HighlightColor() const noexcept; + void Mass(double m) noexcept { mass = m; size = std::cbrt(mass / density); } double Mass() const noexcept { return mass; } void Grow(double amount) noexcept; @@ -66,6 +75,7 @@ public: double Size() const noexcept; double Age() const noexcept; + double AgeLerp(double from, double to) const noexcept; // change of giving birth per tick double Fertility() const noexcept; @@ -110,6 +120,9 @@ private: Genome::Properties properties; int cur_prop; + glm::dvec3 base_color; + glm::dvec3 highlight_color; + double mass; double density; double size;