Removed physics for now.
This commit is contained in:
34
archive/physics_components/2d/Collider2D.hpp
Normal file
34
archive/physics_components/2d/Collider2D.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
// 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<SceneItem> item);
|
||||
|
||||
/**
|
||||
* Returns which type of collider this is.
|
||||
*
|
||||
* @return The collider type that this is.
|
||||
*/
|
||||
virtual enum Collider2DType getColliderType() = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user