mirror of https://github.com/CGAL/cgal
62 lines
1.7 KiB
C++
62 lines
1.7 KiB
C++
// Copyright (c) 2023 INRIA (France).
|
|
// All rights reserved.
|
|
//
|
|
// This file is part of CGAL (www.cgal.org).
|
|
//
|
|
// $URL$
|
|
// $Id$
|
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
|
//
|
|
// Author(s) : Sven Oesau
|
|
|
|
#ifndef ORTHTREE_TESTS_ORTHTREE_TRAITS_WITHOUT_DATA_H
|
|
#define ORTHTREE_TESTS_ORTHTREE_TRAITS_WITHOUT_DATA_H
|
|
|
|
#include <CGAL/license/Orthtree.h>
|
|
|
|
#include <CGAL/Dimension.h>
|
|
#include <CGAL/Bbox_2.h>
|
|
#include <CGAL/Point_set_2.h>
|
|
#include <CGAL/Orthtree/Cartesian_ranges.h>
|
|
|
|
#include <CGAL/Orthtree_traits_base.h>
|
|
|
|
namespace CGAL {
|
|
|
|
/*!
|
|
\ingroup PkgOrthtreeTraits
|
|
|
|
Traits class for defining an orthtree using the class `CGAL::Orthtree` without storing data in the nodes.
|
|
|
|
\tparam GeomTraits model of `Kernel`.
|
|
\tparam dimension the dimension of the ambient Euclidean space.
|
|
|
|
\cgalModels{OrthtreeTraits}
|
|
\sa `CGAL::Octree`
|
|
\sa `CGAL::Quadtree`
|
|
\sa `CGAL::Orthtree_traits_base<GeomTraits, DimensionTag>`
|
|
*/
|
|
template <typename GeomTraits, int dimension>
|
|
struct Orthtree_traits_without_data: public Orthtree_traits_base<GeomTraits, dimension> {
|
|
public:
|
|
using Base = Orthtree_traits_base<GeomTraits, dimension>;
|
|
using Self = Orthtree_traits_without_data<GeomTraits, dimension>;
|
|
using Tree = Orthtree<Self>;
|
|
|
|
using Node_index = typename Base::Node_index;
|
|
|
|
Orthtree_traits_without_data() {}
|
|
|
|
auto construct_root_node_bbox_object() const {
|
|
return [&]() -> typename Self::Bbox_d {
|
|
return {std::apply(Self::construct_point_d_object(), std::array<typename Self::FT, Self::dimension>{-1.0, -1.0, -1.0}),
|
|
std::apply(Self::construct_point_d_object(), std::array<typename Self::FT, Self::dimension>{1.0, 1.0, 1.0})};
|
|
};
|
|
}
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif //ORTHTREE_TESTS_ORTHTREE_TRAITS_WITHOUT_DATA_H
|