AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
BoundingBox.h
1#pragma once
2#include <glm/glm.hpp>
3#include <vector>
4
5namespace Aire {
8 class BoundingBox {
9 public:
14 BoundingBox(int aID, glm::vec2 aPosition, glm::vec2 size);
15
18 void addToBox(int id);
19
22 void removeFromBox(int id);
23
27 bool boxContains(int id);
28
30 int id;
31
33 glm::vec2 position;
34
36 glm::vec2 size;
37
39 std::vector<int> rbIDs;
40
41 // Position flags
42 bool isTopEdge = false;
43 bool isBotEdge = false;
44
45 };
46}
Definition BoundingBox.h:8
void removeFromBox(int id)
Definition BoundingBox.cpp:17
glm::vec2 size
Size of the bounding box.
Definition BoundingBox.h:36
std::vector< int > rbIDs
List of rigidbody ids in the bounding box.
Definition BoundingBox.h:39
bool boxContains(int id)
Definition BoundingBox.cpp:23
void addToBox(int id)
Definition BoundingBox.cpp:11
BoundingBox(int aID, glm::vec2 aPosition, glm::vec2 size)
Definition BoundingBox.cpp:5
int id
Id of the bounding box.
Definition BoundingBox.h:30
glm::vec2 position
World position of the bounding box.
Definition BoundingBox.h:33