Rehti MMORPG  1.0.0
Rehti MMORPG is a free and open source MMORPG game.
AABB.cpp File Reference
#include <math.h>
#include "AABB.hpp"
#include "RehtiUtils.hpp"
Include dependency graph for AABB.cpp:

Functions

glm::vec3 minVector (const glm::vec3 &a, const glm::vec3 &b)
 Constructs a minimum vector from two vectors. More...
 
glm::vec3 maxVector (const glm::vec3 &a, const glm::vec3 &b)
 Constructs a maximum vector from two vectors. More...
 
std::vector< std::unique_ptr< AABB > > createMapAABB (const MapAABBData &input)
 Creates a list of AABBs trees for each area in the areaMatrix. More...
 
std::unique_ptr< AABBcreateAreaAABB (AABB *aabb, const int x, const int y, const int xsize, const int ysize, const MapAABBData &input, bool burgerFlip)
 Recursively creates an AABB tree for a single area. More...
 

Function Documentation

◆ createAreaAABB()

std::unique_ptr<AABB> createAreaAABB ( AABB aabb,
const int  x,
const int  y,
const int  xsize,
const int  ysize,
const MapAABBData input,
bool  burgerFlip 
)

Recursively creates an AABB tree for a single area.

Parameters
aabbThe parent AABB. If this is the root AABB, then this is nullptr.
xThe min x coordinate of the area.
yThe min y coordinate of the area.
xsizeThe width of the area.
ysizeThe height of the area.
inputThe input data for the AABB tree.
burgerFlipUsed to change the direction during recursion.
Returns
The root AABB of the area
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createMapAABB()

std::vector<std::unique_ptr<AABB> > createMapAABB ( const MapAABBData input)

Creates a list of AABBs trees for each area in the areaMatrix.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxVector()

glm::vec3 maxVector ( const glm::vec3 &  a,
const glm::vec3 &  b 
)

Constructs a maximum vector from two vectors.

Parameters
avector a
bvector b
Returns
maximum vector
Here is the caller graph for this function:

◆ minVector()

glm::vec3 minVector ( const glm::vec3 &  a,
const glm::vec3 &  b 
)

Constructs a minimum vector from two vectors.

Parameters
avector a
bvector b
Returns
minimum vector
Here is the caller graph for this function: