38#ifndef BOX_SYSTEM_HEADER
39#define BOX_SYSTEM_HEADER
68#define MAX_NO_OF_BOX_LEVELS 30
85 int* resultOrgIndexList)
const;
90 int* resultOrgIndexList,
ergo_real get_min_distance_from_point_to_box(const ergo_real *boxCenterCoords, ergo_real halfwidth, const ergo_real *point)
Definition box_system.cc:333
#define MAX_NO_OF_BOX_LEVELS
Definition box_system.h:68
int totNoOfBoxes
Definition box_system.h:73
box_level_struct levelList[MAX_NO_OF_BOX_LEVELS]
Definition box_system.h:75
int noOfLevels
Definition box_system.h:74
BoxSystem()
Definition box_system.cc:54
box_struct_basic * boxList
Definition box_system.h:76
int get_items_near_point_recursive(const box_item_struct *itemList, const ergo_real *coords, ergo_real distance, int *resultOrgIndexList, int level, int boxIndex) const
Definition box_system.cc:352
int create_box_system(box_item_struct *itemList, int noOfItems, ergo_real toplevelBoxSize)
Creates the box system.
Definition box_system.cc:74
~BoxSystem()
Definition box_system.cc:59
int get_items_near_point(const box_item_struct *itemList, const ergo_real *coords, ergo_real distance, int *resultOrgIndexList) const
Goes through existning box system to find all items within specified distance from given reference po...
Definition box_system.cc:430
static ergo_real distance(const ergo_real *a, const ergo_real *b)
Coomputes distance between two points, they do not need to be of the Vector3D type.
Definition dft_common.cc:526
Definition of the main floating-point datatype used; the ergo_real type.
double ergo_real
Definition realtype.h:69
Definition box_system.h:46
ergo_real centerCoords[3]
Definition box_system.h:47
int originalIndex
Definition box_system.h:48
Definition box_system.h:63
int noOfBoxes
Definition box_system.h:64
int startIndexInBoxList
Definition box_system.h:65
Definition box_system.h:53
ergo_real width
Definition box_system.h:55
int firstItemIndex
Definition box_system.h:57
int noOfItems
Definition box_system.h:56
int firstChildBoxIndex
Definition box_system.h:59
ergo_real centerCoords[3]
Definition box_system.h:54
int noOfChildBoxes
Definition box_system.h:58