// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "scene/SceneItemComponent.hpp" #include "physics/2d/Box.hpp" namespace Dawn { enum Collider2DType { COLLIDER2D_TYPE_BOX }; struct Collider2DAxisAlignedCollidingResult { glm::vec2 normal; float_t entryTime; float_t exitTime; glm::vec2 entryPoint; glm::vec2 exitPoint; }; class Collider2D : public SceneItemComponent { public: Collider2D(std::weak_ptr item); /** * Returns which type of collider this is. * * @return The collider type that this is. */ virtual enum Collider2DType getColliderType() = 0; }; }