-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollider.h
More file actions
36 lines (28 loc) · 782 Bytes
/
Collider.h
File metadata and controls
36 lines (28 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef COLLIDER_H
#define COLLIDER_H
#include "glad/glad.h"
#include <memory>
#include "Component.h"
#include "Transform.h"
#include "Collisions.h"
#include "Mesh.h"
namespace Components
{
class GameObject;
class Collider : public Component, public std::enable_shared_from_this<Collider>
{
public:
std::shared_ptr<Components::Transform> transform_;
std::shared_ptr<collisions::AABB> bp_collider_;
std::shared_ptr<collisions::ConvexHull> np_collider_;
int layer_;
Collider(int layer, int precision, const std::shared_ptr<Mesh> mesh, std::shared_ptr<Transform> transform_);
~Collider() = default;
// Inherited via Component
void Start() override;
void Update() override;
void Destroy() override;
void UpdateColliders();
};
}
#endif // !COLLIDER_H