summaryrefslogtreecommitdiff
path: root/engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h')
-rw-r--r--engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h b/engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h
new file mode 100644
index 0000000..8beca39
--- /dev/null
+++ b/engine-ocean/Game/Systems/CollisionSystems/environmentcollisiondetectionsystem.h
@@ -0,0 +1,43 @@
+#ifndef ENVIRONMENTCOLLISIONDETECTIONSYSTEM_H
+#define ENVIRONMENTCOLLISIONDETECTIONSYSTEM_H
+
+
+#include "Game/Components/CollisionComponents/CollisionComponent.h"
+#include "Game/Components/TransformComponent.h"
+#include "Game/Systems/CollisionSystems/ellipsoidtrianglecollisionsystem.h"
+#include <memory>
+#include "Game/Systems/system.h"
+
+class EnvironmentCollisionDetectionSystem /*: public System*/
+{
+public:
+ EnvironmentCollisionDetectionSystem(
+ std::map<std::string, std::shared_ptr<GameObject>>& dynamic_gameobjects,
+ std::map<std::string, std::shared_ptr<GameObject>>& rigid_gameobjects,
+ std::map<std::string, std::vector<std::shared_ptr<GameObject>>>& lootables,
+ std::map<std::string, BlackboardData>& global_blackboard);
+ void draw() ;
+ void update(double deltaTime);
+ void scrollEvent(double distance);
+ void mousePosEvent(double xpos, double ypos) ;
+
+
+private:
+ void detectCollisionWithEnvironment(double deltaTime);
+ CollisionComponent* getCollisionComp(std::shared_ptr<GameObject> &go);
+ TransformComponent* getTransform(std::shared_ptr<GameObject> &go);
+
+ void collideDynamic(std::string go_name, std::shared_ptr<GameObject> go);
+
+
+ std::map<std::string, std::shared_ptr<GameObject>>& m_dynamic_gameobjects;
+ std::unique_ptr<EllipsoidTriangleCollisionSystem> m_ellipsoid_triangle_collision_system;
+ //std::unique_ptr<BVHTree> m_bvh_system;
+ std::vector<std::shared_ptr<GameObject>> all_rigid_go;
+ std::map<std::string, BlackboardData>& m_global_blackboard;
+
+ std::map<std::string, std::vector<std::shared_ptr<GameObject>>>& m_lootables;
+
+};
+
+#endif // ENVIRONMENTCOLLISIONDETECTIONSYSTEM_H