CheeseEngine
A 2D Game Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
phys2d::AABB Struct Reference

#include <types.hpp>

Public Member Functions

 AABB ()=default
 
 AABB (const glm::vec2 &lb, const glm::vec2 &ub)
 constructor for AABB-object
 
bool collidesWith (const AABB &other) const
 checks the collision between two AABB-objects
 

Public Attributes

glm::vec2 lowerBound
 point with the smallest coords
 
glm::vec2 upperBound
 point with the biggest coords
 

Constructor & Destructor Documentation

◆ AABB() [1/2]

phys2d::AABB::AABB ( )
default

◆ AABB() [2/2]

phys2d::AABB::AABB ( const glm::vec2 &  lb,
const glm::vec2 &  ub 
)

constructor for AABB-object

Parameters
lblower bound, point with the smallest coords
ubupper bound, point with the biggest coords
Return values
None

Member Function Documentation

◆ collidesWith()

bool phys2d::AABB::collidesWith ( const AABB other) const

checks the collision between two AABB-objects

Parameters
otherAABB-object to check collision with
Return values
trueif the objects collide and false else

Member Data Documentation

◆ lowerBound

glm::vec2 phys2d::AABB::lowerBound

point with the smallest coords

◆ upperBound

glm::vec2 phys2d::AABB::upperBound

point with the biggest coords


The documentation for this struct was generated from the following file: