mirror of https://github.com/CGAL/cgal
PointSet -> PointRange
This commit is contained in:
parent
add12f51bf
commit
8097ba81bc
|
|
@ -13,7 +13,7 @@
|
|||
\cgalRefines{OrthtreeTraits}
|
||||
|
||||
\cgalHasModelsBegin
|
||||
\cgalHasModels{CGAL::Orthtree_traits_point<GeomTraits, PointSet, PointMap, DimensionTag>}
|
||||
\cgalHasModels{CGAL::Orthtree_traits_point<GeomTraits, PointRange, PointMap, DimensionTag>}
|
||||
\cgalHasModelsEnd
|
||||
*/
|
||||
class CollectionPartitioningOrthtreeTraits {
|
||||
|
|
@ -39,7 +39,7 @@ public:
|
|||
/*!
|
||||
* \brief Functor with an operator to produce a geometric object from a `Node_data_element`.
|
||||
*
|
||||
* The return type of the functor must be a valid argument to `CGAL::squared_distance`.
|
||||
* The return type of the functor must be a valid argument to `CGAL::squared_distance()`.
|
||||
*/
|
||||
using Get_geometric_object_for_element = unspecified_type;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
template parameter of the `CGAL::Orthtree` class.
|
||||
|
||||
\cgalHasModelsBegin
|
||||
\cgalHasModels{CGAL::Orthtree_traits_point<GeomTraits, PointSet, PointMap, DimensionTag>}
|
||||
\cgalHasModels{CGAL::Orthtree_traits_point<GeomTraits, PointRange, PointMap, DimensionTag>}
|
||||
\cgalHasModels{CGAL::Orthtree_traits_face_graph<PolygonMesh, VPM>}
|
||||
\cgalHasModelsEnd
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ namespace CGAL {
|
|||
\ingroup PkgOrthtreeTraits
|
||||
|
||||
The class `Orthtree_traits_base_for_dimension` is a base class providing common choices for types and functors.
|
||||
The base class is extended by `CGAL::Orthtree_traits_point<GeomTraits, PointSet, PointMap, DimensionTag>` and by `CGAL::Orthtree_traits_face_graph<PolygonMesh, VertexPointMap>`.
|
||||
The base class is extended by `CGAL::Orthtree_traits_point<GeomTraits, PointRange, PointMap, DimensionTag>` and by `CGAL::Orthtree_traits_face_graph<PolygonMesh, VertexPointMap>`.
|
||||
|
||||
\tparam K model of `Kernel`.
|
||||
\tparam DimensionTag is a tag representing the dimension of the ambient Euclidean space. Must be `Dimension_tag<d>` where `d` is an integer.
|
||||
|
||||
\sa `CGAL::Orthtree_traits_point<GeomTraits, PointSet, PointMap, DimensionTag>`
|
||||
\sa `CGAL::Orthtree_traits_point<GeomTraits, PointRange, PointMap, DimensionTag>`
|
||||
\sa `CGAL::Orthtree_traits_face_graph<PolygonMesh, VertexPointMap>`
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void reassign_points(
|
|||
the `Orthtree` class.
|
||||
|
||||
\tparam GeomTraits model of `Kernel`.
|
||||
\tparam PointSet must be a model of range whose value type is the key type of `PointMap`
|
||||
\tparam PointRange must be a model of `Range` whose value type is the key type of `PointMap`
|
||||
\tparam PointMap must be a model of `ReadablePropertyMap` whose value type is `GeomTraits::Traits::Point_d`
|
||||
|
||||
\warning The input point set is not copied. It is used directly
|
||||
|
|
@ -80,10 +80,10 @@ void reassign_points(
|
|||
*/
|
||||
template <
|
||||
typename GeomTraits,
|
||||
typename PointSet,
|
||||
typename PointMap = Identity_property_map<typename std::iterator_traits<typename PointSet::iterator>::value_type>,
|
||||
typename PointRange,
|
||||
typename PointMap = Identity_property_map<typename std::iterator_traits<typename PointRange::iterator>::value_type>,
|
||||
typename DimensionTag = Ambient_dimension<
|
||||
typename std::iterator_traits<typename PointSet::iterator>::value_type,
|
||||
typename std::iterator_traits<typename PointRange::iterator>::value_type,
|
||||
GeomTraits
|
||||
>
|
||||
>
|
||||
|
|
@ -93,18 +93,18 @@ public:
|
|||
/// \name Types
|
||||
/// @{
|
||||
|
||||
using Self = Orthtree_traits_point<GeomTraits, PointSet, PointMap, DimensionTag>;
|
||||
using Self = Orthtree_traits_point<GeomTraits, PointRange, PointMap, DimensionTag>;
|
||||
using Tree = Orthtree<Self>;
|
||||
|
||||
using Node_data = boost::iterator_range<typename PointSet::iterator>;
|
||||
using Node_data_element = typename std::iterator_traits<typename PointSet::iterator>::value_type;
|
||||
using Node_data = boost::iterator_range<typename PointRange::iterator>;
|
||||
using Node_data_element = typename std::iterator_traits<typename PointRange::iterator>::value_type;
|
||||
|
||||
/// @}
|
||||
|
||||
Orthtree_traits_point(
|
||||
PointSet& point_set,
|
||||
PointRange& points,
|
||||
PointMap point_map = PointMap()
|
||||
) : m_point_set(point_set), m_point_map(point_map) {}
|
||||
) : m_points(points), m_point_map(point_map) {}
|
||||
|
||||
/// \name Operations
|
||||
/// @{
|
||||
|
|
@ -117,7 +117,7 @@ public:
|
|||
|
||||
// init bbox with first values found
|
||||
{
|
||||
const typename Self::Point_d& point = get(m_point_map, *(m_point_set.begin()));
|
||||
const typename Self::Point_d& point = get(m_point_map, *(m_points.begin()));
|
||||
std::size_t i = 0;
|
||||
for (const typename Self::FT& x: cartesian_range(point)) {
|
||||
bbox_min[i] = x;
|
||||
|
|
@ -126,7 +126,7 @@ public:
|
|||
}
|
||||
}
|
||||
// Expand bbox to contain all points
|
||||
for (const auto& p: m_point_set) {
|
||||
for (const auto& p: m_points) {
|
||||
const typename Self::Point_d& point = get(m_point_map, p);
|
||||
std::size_t i = 0;
|
||||
for (const typename Self::FT& x: cartesian_range(point)) {
|
||||
|
|
@ -143,7 +143,7 @@ public:
|
|||
|
||||
auto construct_root_node_contents_object() const {
|
||||
return [&]() -> typename Self::Node_data {
|
||||
return {m_point_set.begin(), m_point_set.end()};
|
||||
return {m_points.begin(), m_points.end()};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
PointSet& m_point_set;
|
||||
PointRange& m_points;
|
||||
PointMap m_point_map;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue