#pragma once #include #include "KSolid.h" #include "KVector2d.h" namespace KapitanGame { class KCollider { public: KCollider(const KCollider& other); KCollider(KCollider&& other) noexcept; KCollider& operator=(const KCollider& other); KCollider& operator=(KCollider&& other) noexcept; explicit KCollider(KSolid* parent); virtual ~KCollider() = default; virtual bool IsCollision(const KCollider* other) const = 0; virtual KVector2D GetSeparationVector(const KCollider* other) const = 0; [[nodiscard]] virtual KVector2D GetSeparationVector(const SDL_FRect& map) const = 0; [[nodiscard]] virtual float GetWidth() const = 0; [[nodiscard]] virtual float GetHeight() const = 0; [[nodiscard]] KSolid* GetParent() const; private: KSolid* Parent; }; }