AABB handler include header. More...

#include <SDL.h>
Include dependency graph for AABB.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AABB_t
 Axis-aligned bounding box handle data. More...
 

Typedefs

typedef struct AABB_t AABB
 Axis-aligned bounding box handle type.
 

Functions

SDL_bool AABB_BoxesDoIntersect (const AABB stBoxA, const AABB stBoxB)
 Check if two axis-aligned bounding boxes intersect. More...
 

Detailed Description

AABB handler include header.

Function Documentation

◆ AABB_BoxesDoIntersect()

SDL_bool AABB_BoxesDoIntersect ( const AABB  stBoxA,
const AABB  stBoxB 
)

Check if two axis-aligned bounding boxes intersect.

Can be used to trigger events e.g. when two entities intersect

Parameters
stBoxABounding box A
stBoxBBounding box B
Returns
Boolean value
Return values
SDL_TRUEBoxes intersect
SDL_FALSEBoxes do not intersect