Example #1
0
QuadTree::QuadTree(const box &bounds, const std::size_t &max_leaves)
{
    if(bounds.dimensions_set())
    {
        this->bounds = bounds;
    }

    this->max_leaves = ((max_leaves > 0) && (max_leaves > DEFAULT_MAX_LEAVES)) ? max_leaves : DEFAULT_MAX_LEAVES;

    this->northwest = NULL;
    this->northeast = NULL;
    this->southwest = NULL;
    this->southeast = NULL;
}