summaryrefslogtreecommitdiff
path: root/sim/include
diff options
context:
space:
mode:
Diffstat (limited to 'sim/include')
-rw-r--r--sim/include/kurator/sim/FloatingMovement.h4
-rw-r--r--sim/include/kurator/sim/Point.h26
-rw-r--r--sim/include/kurator/sim/components.h6
3 files changed, 5 insertions, 31 deletions
diff --git a/sim/include/kurator/sim/FloatingMovement.h b/sim/include/kurator/sim/FloatingMovement.h
index 352377d..d7e8479 100644
--- a/sim/include/kurator/sim/FloatingMovement.h
+++ b/sim/include/kurator/sim/FloatingMovement.h
@@ -3,7 +3,7 @@
#include <entt/entity/registry.hpp>
#include <entt/signal/dispatcher.hpp>
-#include "Point.h"
+#include <kurator/engine/Point.h>
namespace kurator
@@ -18,7 +18,7 @@ struct FloatingMovement
double acceleration;
double deceleration;
double destination_boundary = 100.0;
- Point speed = {0.0, 0.0};
+ engine::Point speed = {0.0, 0.0};
static void update(entt::registry& registry, entt::dispatcher& dispatcher, float dt);
};
diff --git a/sim/include/kurator/sim/Point.h b/sim/include/kurator/sim/Point.h
deleted file mode 100644
index afd30ba..0000000
--- a/sim/include/kurator/sim/Point.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-
-namespace kurator
-{
-namespace sim
-{
-
-
-struct Point
-{
- double x;
- double y;
- double magnitude() const;
- double distance(const Point& other) const;
- double angle() const;
- Point rotate(double angle) const;
- Point scale(double _scale) const;
- Point normalized() const;
- Point operator-(const Point& other) const;
- Point operator+(const Point& other) const;
-};
-
-
-} // namespace sim
-} // namespace kurator
diff --git a/sim/include/kurator/sim/components.h b/sim/include/kurator/sim/components.h
index f4f1799..e8b2591 100644
--- a/sim/include/kurator/sim/components.h
+++ b/sim/include/kurator/sim/components.h
@@ -2,7 +2,7 @@
#include <entt/entity/entity.hpp>
-#include "Point.h"
+#include <kurator/engine/Point.h>
namespace kurator
@@ -13,7 +13,7 @@ namespace sim
struct Transform
{
- Point position;
+ engine::Point position;
double angle;
entt::entity reference_frame = entt::null;
};
@@ -28,7 +28,7 @@ struct Team
struct AIState
{
double keep_at_range;
- Point destination;
+ engine::Point destination;
entt::entity target = entt::null;
};