![]() |
AireEngine
A 3D Open-World Game Engine
|
#include <BoundingBox.h>
Public Member Functions | |
| BoundingBox (int aID, glm::vec2 aPosition, glm::vec2 size) | |
| void | addToBox (int id) |
| void | removeFromBox (int id) |
| bool | boxContains (int id) |
Public Attributes | |
| int | id |
| Id of the bounding box. | |
| glm::vec2 | position |
| World position of the bounding box. | |
| glm::vec2 | size |
| Size of the bounding box. | |
| std::vector< int > | rbIDs |
| List of rigidbody ids in the bounding box. | |
| bool | isTopEdge = false |
| bool | isBotEdge = false |
A class for defining a bounding box that can store a number of rigidbodies
| BoundingBox::BoundingBox | ( | int | aID, |
| glm::vec2 | aPosition, | ||
| glm::vec2 | size ) |
Constructor function that defines a bounding box by a given position and 2 dimensional size
| aID | ID to initialise the bounding box with |
| aPosition | Position of the bounding box from bottom left corner |
| size | of the bounding box in x and y |
Function to add an id to a box
| id | ID to add to the box |
Function to see if box contains an ID
| id | ID to check for |
Function to remove an id from a box
| id | ID to remove from the box |