Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
areastore.cpp File Reference
#include "util/areastore.h"
#include "util/serialize.h"
#include "util/container.h"
#include <spatialindex/SpatialIndex.h>
#include <spatialindex/RTree.h>
#include <spatialindex/Point.h>
+ Include dependency graph for areastore.cpp:

Macros

#define AST_SMALLER_EQ_AS(p, q)   (((p).X <= (q).X) && ((p).Y <= (q).Y) && ((p).Z <= (q).Z))
 
#define AST_OVERLAPS_IN_DIMENSION(amine, amaxe, b, d)    (!(((amine).d > (b)->maxedge.d) || ((amaxe).d < (b)->minedge.d)))
 
#define AST_CONTAINS_PT(a, p)
 
#define AST_CONTAINS_AREA(amine, amaxe, b)
 
#define AST_AREAS_OVERLAP(amine, amaxe, b)
 

Functions

static SpatialIndex::Region get_spatial_region (const v3s16 minedge, const v3s16 maxedge)
 
static SpatialIndex::Point get_spatial_point (const v3s16 pos)
 

Macro Definition Documentation

◆ AST_AREAS_OVERLAP

#define AST_AREAS_OVERLAP ( amine,
amaxe,
b )
Value:
(AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), X) && \
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Y) && \
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Z))
#define AST_OVERLAPS_IN_DIMENSION(amine, amaxe, b, d)
Definition areastore.cpp:17

Referenced by VectorAreaStore::getAreasInArea().

◆ AST_CONTAINS_AREA

#define AST_CONTAINS_AREA ( amine,
amaxe,
b )
Value:
(AST_SMALLER_EQ_AS((amine), (b)->minedge) \
&& AST_SMALLER_EQ_AS((b)->maxedge, (amaxe)))
#define AST_SMALLER_EQ_AS(p, q)
Definition areastore.cpp:15

Referenced by VectorAreaStore::getAreasInArea().

◆ AST_CONTAINS_PT

#define AST_CONTAINS_PT ( a,
p )
Value:
(AST_SMALLER_EQ_AS((a)->minedge, (p)) && \
AST_SMALLER_EQ_AS((p), (a)->maxedge))
static std::string p(std::string path)
Definition test_filesys.cpp:53

Referenced by AreaStore::getAreasForPos(), and VectorAreaStore::getAreasForPosImpl().

◆ AST_OVERLAPS_IN_DIMENSION

#define AST_OVERLAPS_IN_DIMENSION ( amine,
amaxe,
b,
d )    (!(((amine).d > (b)->maxedge.d) || ((amaxe).d < (b)->minedge.d)))

◆ AST_SMALLER_EQ_AS

#define AST_SMALLER_EQ_AS ( p,
q )   (((p).X <= (q).X) && ((p).Y <= (q).Y) && ((p).Z <= (q).Z))

Function Documentation

◆ get_spatial_point()

static SpatialIndex::Point get_spatial_point ( const v3s16 pos)
inlinestatic

References p().

Referenced by SpatialAreaStore::getAreasForPosImpl().

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

◆ get_spatial_region()

static SpatialIndex::Region get_spatial_region ( const v3s16 minedge,
const v3s16 maxedge )
inlinestatic

Referenced by SpatialAreaStore::getAreasInArea(), SpatialAreaStore::insertArea(), and SpatialAreaStore::removeArea().

+ Here is the caller graph for this function: