diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-11-10 21:38:58 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-11-10 21:38:58 +0100 |
commit | 47dd27c42f375b65ee53f8b1e8c1b25327315a92 (patch) | |
tree | c3206a49e7826e4e6f8a506e0d596d58393c2d6b /src/crepe/system/CollisionSystem.h | |
parent | 428182f45797de73b0bc2335916d25762b0d719b (diff) |
box-box collision
Diffstat (limited to 'src/crepe/system/CollisionSystem.h')
-rw-r--r-- | src/crepe/system/CollisionSystem.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/crepe/system/CollisionSystem.h b/src/crepe/system/CollisionSystem.h index 1e9f1aa..402ba64 100644 --- a/src/crepe/system/CollisionSystem.h +++ b/src/crepe/system/CollisionSystem.h @@ -1,11 +1,25 @@ #pragma once +#include "Collider.h" +#include <vector> + namespace crepe { +class Collider; +class BoxCollider; +class CircleCollider; +class Transform; +class Rigidbody; + class CollisionSystem { public: CollisionSystem(); void update(); +private: + bool check_collisions(const std::vector<Collider*>& colliders1, const std::vector<Collider*>& colliders2); + bool check_box_box_collision(const BoxCollider& box1, const BoxCollider& box2, const Transform& transform1, const Transform& transform2, const Rigidbody& rigidbody1, const Rigidbody& rigidbody2); + bool check_box_circle_collision(const BoxCollider& box, const CircleCollider& circle); + bool check_circle_circle_collision(const CircleCollider& circle1, const CircleCollider& circle2); }; } // namespace crepe |