ergo
box_system.cc File Reference

BoxSystem class representing a hierarchical data structure of boxes in 3D space (an oct-tree). More...

#include <cmath>
#include <stdlib.h>
#include <vector>
#include "box_system.h"
#include "output.h"
#include "memorymanag.h"
#include "utilities.h"
#include "mat_gblas.h"

Functions

ergo_real get_min_distance_from_point_to_box (const ergo_real *boxCenterCoords, ergo_real halfwidth, const ergo_real *point)
 
static int compare_ints (const void *p1, const void *p2)
 

Detailed Description

BoxSystem class representing a hierarchical data structure of boxes in 3D space (an oct-tree).

The idea is that you have a list of items at different points in space, and you want a hierarchical system of boxes containing those items.

You give a list of items, and the function create_box_system will create a system of boxes for you.

Author
: Elias Rudberg responsible

Function Documentation

◆ compare_ints()

static int compare_ints ( const void *  p1,
const void *  p2 
)
static

◆ get_min_distance_from_point_to_box()

ergo_real get_min_distance_from_point_to_box ( const ergo_real boxCenterCoords,
ergo_real  halfwidth,
const ergo_real point 
)