KiCad PCB EDA Suite
container_2d.cpp File Reference
#include "container_2d.h"
#include "../ray.h"
#include <boost/range/algorithm/partition.hpp>
#include <boost/range/algorithm/nth_element.hpp>
#include <wx/debug.h>

Go to the source code of this file.

Macros

#define BVH_CONTAINER2D_MAX_OBJ_PER_LEAF   4
 

Functions

static bool sortByCentroidX (const OBJECT_2D *a, const OBJECT_2D *b)
 
static bool sortByCentroidY (const OBJECT_2D *a, const OBJECT_2D *b)
 
static bool sortByCentroidZ (const OBJECT_2D *a, const OBJECT_2D *b)
 

Macro Definition Documentation

◆ BVH_CONTAINER2D_MAX_OBJ_PER_LEAF

#define BVH_CONTAINER2D_MAX_OBJ_PER_LEAF   4

Definition at line 119 of file container_2d.cpp.

Function Documentation

◆ sortByCentroidX()

static bool sortByCentroidX ( const OBJECT_2D a,
const OBJECT_2D b 
)
static

Definition at line 155 of file container_2d.cpp.

156 {
157  return a->GetCentroid()[0] < b->GetCentroid()[0];
158 }
const SFVEC2F & GetCentroid() const
Definition: object_2d.h:105

References OBJECT_2D::GetCentroid().

Referenced by BVH_CONTAINER_2D::recursiveBuild_MIDDLE_SPLIT().

◆ sortByCentroidY()

static bool sortByCentroidY ( const OBJECT_2D a,
const OBJECT_2D b 
)
static

Definition at line 161 of file container_2d.cpp.

162 {
163  return a->GetCentroid()[0] < b->GetCentroid()[0];
164 }
const SFVEC2F & GetCentroid() const
Definition: object_2d.h:105

References OBJECT_2D::GetCentroid().

Referenced by BVH_CONTAINER_2D::recursiveBuild_MIDDLE_SPLIT().

◆ sortByCentroidZ()

static bool sortByCentroidZ ( const OBJECT_2D a,
const OBJECT_2D b 
)
static

Definition at line 167 of file container_2d.cpp.

168 {
169  return a->GetCentroid()[0] < b->GetCentroid()[0];
170 }
const SFVEC2F & GetCentroid() const
Definition: object_2d.h:105

References OBJECT_2D::GetCentroid().

Referenced by BVH_CONTAINER_2D::recursiveBuild_MIDDLE_SPLIT().