VOX
A little voxel engine
Loading...
Searching...
No Matches
HitBox.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "define.hpp"
4#include "Transform.hpp"
5
6#include <glm/glm.hpp>
7
8#include <vector>
9
10class HitBox
11{
12
13public:
14
15 HitBox(
16 const glm::dvec3 & position,
17 const glm::dvec3 & size
18 );
19 ~HitBox();
20
21 HitBox(const HitBox & other) = default;
22 HitBox(HitBox && other) = default;
23 HitBox & operator=(const HitBox & other) = delete;
24 HitBox & operator=(HitBox && other) = delete;
25
26 glm::dvec3 position; // local position
27 glm::dvec3 size;
28};
29
30bool isColliding(
31 const HitBox & hitbox1,
32 const glm::dvec3 & position1,
33 const HitBox & hitbox2,
34 const glm::dvec3 & position2
35);
bool isColliding(const HitBox &hitbox1, const glm::dvec3 &position1, const HitBox &hitbox2, const glm::dvec3 &position2)
Definition: HitBox.cpp:17
Definition: HitBox.hpp:11
glm::dvec3 position
Definition: HitBox.hpp:26
HitBox & operator=(const HitBox &other)=delete
glm::dvec3 size
Definition: HitBox.hpp:27
HitBox(HitBox &&other)=default
HitBox & operator=(HitBox &&other)=delete
HitBox(const HitBox &other)=default
~HitBox()
Definition: HitBox.cpp:13