File EntityQuadTree.h

FileList > engine > include > EntityQuadTree.h

Go to the source code of this file

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

  • #include "HandleDefs.h"
  • #include "Entities.h"
  • #include <cglm/cglm.h>

Classes

Type Name
struct Entity2DQuadTreeInitArgs

Public Attributes

Type Name
vec2 vec2 struct Entity2DCollection * pCollection
vec2 vec2 struct Entity2DCollection struct GameFrameworkLayer * pLayer
vec2 vec2 regionBR
vec2 regionTL

Public Functions

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

Macros

Type Name
define VECTOR (a) a\*

Public Attributes Documentation

variable pCollection

vec2 vec2 struct Entity2DCollection* pCollection;

variable pLayer

vec2 vec2 struct Entity2DCollection struct GameFrameworkLayer* pLayer;

variable regionBR

vec2 vec2 regionBR;

variable regionTL

vec2 regionTL;

Public Functions Documentation

function DestroyEntity2DQuadTree

void DestroyEntity2DQuadTree (
    HEntity2DQuadtreeNode quadTree
) 

function Entity2DQuadTree_GetDims

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

function Entity2DQuadTree_Insert

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

function Entity2DQuadTree_Remove

void Entity2DQuadTree_Remove (
    HEntity2DQuadtreeNode quadTree,
    HEntity2DQuadtreeEntityRef ent
) 

function GetEntity2DQuadTree

HEntity2DQuadtreeNode GetEntity2DQuadTree (
    struct Entity2DQuadTreeInitArgs * args
) 

function InitEntity2DQuadtreeSystem

void InitEntity2DQuadtreeSystem () 

function VECTOR

VECTOR (
    HEntity2D
) 

Macro Definition Documentation

define VECTOR

#define VECTOR (
    a
) `a*`


The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/include/EntityQuadTree.h