Stardew Engine
Loading...
Searching...
No Matches
EntityQuadTree.h File Reference

static entities are stored in here for fast querying to be rendered TODO: maybe rewrite this and replace with simpler binary space partioning dynamic entities are stored in a simple linked list and are linearly AABBB checked against the screen camera rectangle More...

#include "HandleDefs.h"
#include "Entities.h"
#include <cglm/cglm.h>
Include dependency graph for EntityQuadTree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Entity2DQuadTreeInitArgs
 

Macros

#define VECTOR(a)   a*
 

Functions

void InitEntity2DQuadtreeSystem ()
 
HEntity2DQuadtreeNode GetEntity2DQuadTree (struct Entity2DQuadTreeInitArgs *args)
 
void DestroyEntity2DQuadTree (HEntity2DQuadtreeNode quadTree)
 
HEntity2DQuadtreeEntityRef Entity2DQuadTree_Insert (struct Entity2DCollection *pCollection, HEntity2DQuadtreeNode quadTree, HEntity2D hEnt, struct GameFrameworkLayer *pLayer, int depth, int maxDepth)
 
void Entity2DQuadTree_Remove (HEntity2DQuadtreeNode quadTree, HEntity2DQuadtreeEntityRef ent)
 
 VECTOR (HEntity2D) Entity2DQuadTree_Query(HEntity2DQuadtreeNode quadTree
 
void Entity2DQuadTree_GetDims (HEntity2DQuadtreeNode quadTree, vec2 tl, float *w, float *h)
 

Variables

vec2 regionTL
 
vec2 vec2 regionBR
 
vec2 vec2 struct Entity2DCollectionpCollection
 
vec2 vec2 struct Entity2DCollection struct GameFrameworkLayerpLayer
 

Detailed Description

static entities are stored in here for fast querying to be rendered TODO: maybe rewrite this and replace with simpler binary space partioning dynamic entities are stored in a simple linked list and are linearly AABBB checked against the screen camera rectangle

Macro Definition Documentation

◆ VECTOR

#define VECTOR (   a)    a*

Function Documentation

◆ DestroyEntity2DQuadTree()

void DestroyEntity2DQuadTree ( HEntity2DQuadtreeNode  quadTree)

◆ Entity2DQuadTree_GetDims()

void Entity2DQuadTree_GetDims ( HEntity2DQuadtreeNode  quadTree,
vec2  tl,
float *  w,
float *  h 
)

◆ Entity2DQuadTree_Insert()

HEntity2DQuadtreeEntityRef Entity2DQuadTree_Insert ( struct Entity2DCollection pCollection,
HEntity2DQuadtreeNode  quadTree,
HEntity2D  hEnt,
struct GameFrameworkLayer pLayer,
int  depth,
int  maxDepth 
)

◆ Entity2DQuadTree_Remove()

void Entity2DQuadTree_Remove ( HEntity2DQuadtreeNode  quadTree,
HEntity2DQuadtreeEntityRef  ent 
)

◆ GetEntity2DQuadTree()

HEntity2DQuadtreeNode GetEntity2DQuadTree ( struct Entity2DQuadTreeInitArgs args)

◆ InitEntity2DQuadtreeSystem()

void InitEntity2DQuadtreeSystem ( )

◆ VECTOR()

VECTOR ( HEntity2D  )

Variable Documentation

◆ pCollection

vec2 vec2 struct Entity2DCollection* pCollection

◆ pLayer

vec2 vec2 struct Entity2DCollection struct GameFrameworkLayer* pLayer

◆ regionBR

vec2 vec2 regionBR

◆ regionTL

vec2 regionTL