#include "Genome.hpp"
#include "Goal.hpp"
+#include "Memory.hpp"
#include "Need.hpp"
#include "Situation.hpp"
#include "Steering.hpp"
void Remove() noexcept { removable = true; }
bool Removable() const noexcept { return removable; }
+ Memory &GetMemory() noexcept { return memory; }
+ const Memory &GetMemory() const noexcept { return memory; }
+
void AddNeed(std::unique_ptr<Need> &&n) { needs.emplace_back(std::move(n)); }
const std::vector<std::unique_ptr<Need>> &Needs() const noexcept { return needs; }
Steering &GetSteering() noexcept { return steering; }
const Steering &GetSteering() const noexcept { return steering; }
- void Velocity(const glm::dvec3 &v) noexcept { vel = v; }
- const glm::dvec3 &Velocity() const noexcept { return vel; }
- bool Moving() const noexcept { return glm::length2(vel) < 0.00000001; }
-
glm::dmat4 LocalTransform() noexcept;
void BuildVAO();
void Draw(graphics::Viewport &);
+private:
+ Situation::Derivative Step(const Situation::Derivative &ds, double dt) const noexcept;
+
private:
world::Simulation ∼
std::string name;
Callback on_death;
bool removable;
+ Memory memory;
+
std::vector<std::unique_ptr<Need>> needs;
std::vector<std::unique_ptr<Goal>> goals;
Situation situation;
Steering steering;
- glm::dvec3 vel;
-
struct Attributes {
glm::vec3 position;
glm::vec3 normal;