mirror of https://github.com/CGAL/cgal
small fixes
This commit is contained in:
parent
beea3f2fda
commit
add12f51bf
|
|
@ -20,7 +20,7 @@ public:
|
||||||
using Dimension = unspecified_type; ///< Dimension type (see `CGAL::Dimension_tag`).
|
using Dimension = unspecified_type; ///< Dimension type (see `CGAL::Dimension_tag`).
|
||||||
using FT = unspecified_type; ///< The number type of the %Cartesian coordinates of types `Point_d`
|
using FT = unspecified_type; ///< The number type of the %Cartesian coordinates of types `Point_d`
|
||||||
using Point_d = unspecified_type; ///< Point type.
|
using Point_d = unspecified_type; ///< Point type.
|
||||||
using Bbox_d = unspecified_type; ///< Bounding box type. Must be constructible from a pair of Point_d types.
|
using Bbox_d = unspecified_type; ///< Bounding box type. Must be constructible from a pair of `Point_d` types.
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
A random access iterator type to enumerate the
|
A random access iterator type to enumerate the
|
||||||
|
|
@ -84,7 +84,7 @@ public:
|
||||||
using Distribute_node_contents = unspecified_type;
|
using Distribute_node_contents = unspecified_type;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Functor with an operator to construct a `Point_d` from an appropriate number of x, y, z etc. FT arguments.
|
* \brief Functor with an operator to construct a `Point_d` from an appropriate number of x, y, z etc. `FT` arguments.
|
||||||
*
|
*
|
||||||
* For trees which use a different kernel for the Bbox type,
|
* For trees which use a different kernel for the Bbox type,
|
||||||
* the return type of this functor must match the kernel used by the Bbox and not that of the contents.
|
* the return type of this functor must match the kernel used by the Bbox and not that of the contents.
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ public:
|
||||||
using Node_index = unspecified_type; ///< Index type of the orthtree to be traversed
|
using Node_index = unspecified_type; ///< Index type of the orthtree to be traversed
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief returns the first node to iterate to, given the root of the Orthtree.
|
\brief returns the first node to iterate to, given the root of the orthtree.
|
||||||
*/
|
*/
|
||||||
Node_index first_index() const;
|
Node_index first_index() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,13 @@ namespace CGAL {
|
||||||
|
|
||||||
These two types are exactly equivalent:
|
These two types are exactly equivalent:
|
||||||
- `Octree<GeomTraits, PointRange, PointMap>`
|
- `Octree<GeomTraits, PointRange, PointMap>`
|
||||||
- `Orthtree<Orthtree<Orthtree_traits_point<GeomTraits, PointRange, PointMap, Dimension_tag<3>>>`.
|
- `Orthtree<Orthtree_traits_point<GeomTraits, PointRange, PointMap, Dimension_tag<3>>>`.
|
||||||
|
|
||||||
\warning This is a not a real class but an alias, please refer to
|
\warning This is a not a real class but an alias, please refer to
|
||||||
the documentation of `Orthtree`.
|
the documentation of `Orthtree`.
|
||||||
|
|
||||||
\tparam GeomTraits must be a model of `Kernel`
|
\tparam GeomTraits must be a model of `Kernel`
|
||||||
\tparam PointRange_ 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::Point_3`
|
\tparam PointMap must be a model of `ReadablePropertyMap` whose value type is `GeomTraits::Point_3`
|
||||||
*/
|
*/
|
||||||
template <
|
template <
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,7 @@ public:
|
||||||
which typically encloses its contents.
|
which typically encloses its contents.
|
||||||
|
|
||||||
This single-node orthtree is valid and compatible
|
This single-node orthtree is valid and compatible
|
||||||
with all Orthtree functionality, but any performance benefits are
|
with all orthtree functionality, but any performance benefits are
|
||||||
unlikely to be realized until `refine()` is called.
|
unlikely to be realized until `refine()` is called.
|
||||||
|
|
||||||
\param traits the traits object.
|
\param traits the traits object.
|
||||||
|
|
@ -500,7 +500,7 @@ public:
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief gets a property for nodes, adding it if it doesn't already exist.
|
\brief gets a property for nodes, adding it if it does not already exist.
|
||||||
|
|
||||||
\tparam T the type of the property to add
|
\tparam T the type of the property to add
|
||||||
|
|
||||||
|
|
@ -618,7 +618,7 @@ public:
|
||||||
|
|
||||||
This function finds all the intersecting leaf nodes and writes their indices to the output iterator.
|
This function finds all the intersecting leaf nodes and writes their indices to the output iterator.
|
||||||
|
|
||||||
\tparam Query the primitive class (e.g. sphere, ray)
|
\tparam Query the primitive class (e.g., sphere, ray)
|
||||||
\tparam OutputIterator a model of `OutputIterator` that accepts `Node_index` types
|
\tparam OutputIterator a model of `OutputIterator` that accepts `Node_index` types
|
||||||
|
|
||||||
\param query the intersecting primitive.
|
\param query the intersecting primitive.
|
||||||
|
|
@ -823,7 +823,7 @@ public:
|
||||||
/*!
|
/*!
|
||||||
\brief finds the next sibling in the parent of the node specified by the index `n`.
|
\brief finds the next sibling in the parent of the node specified by the index `n`.
|
||||||
|
|
||||||
Traverses the tree in increasing order of local index (e.g. 000, 001, 010, etc.)
|
Traverses the tree in increasing order of local index (e.g., 000, 001, 010, etc.)
|
||||||
|
|
||||||
\param n the index of the node to find the sibling of
|
\param n the index of the node to find the sibling of
|
||||||
|
|
||||||
|
|
@ -1026,7 +1026,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief helper function for calling `is_topology_equal` on the root nodes of two trees.
|
\brief helper function for calling `is_topology_equal()` on the root nodes of two trees.
|
||||||
|
|
||||||
\param lhs an Orthtree
|
\param lhs an Orthtree
|
||||||
\param rhs another Orthtree
|
\param rhs another Orthtree
|
||||||
|
|
@ -1047,7 +1047,7 @@ public:
|
||||||
- a node has at most `2 * Dimension::value` different adjacent nodes (in 3D: left, right, up, down, front, back)
|
- a node has at most `2 * Dimension::value` different adjacent nodes (in 3D: left, right, up, down, front, back)
|
||||||
- adjacent nodes are not required to be leaf nodes
|
- adjacent nodes are not required to be leaf nodes
|
||||||
|
|
||||||
Here's a diagram demonstrating the concept for a Quadtree:
|
Here's a diagram demonstrating the concept for a quadtree:
|
||||||
|
|
||||||
```
|
```
|
||||||
+---------------+---------------+
|
+---------------+---------------+
|
||||||
|
|
@ -1083,7 +1083,7 @@ public:
|
||||||
\param n index of the node to find a neighbor of
|
\param n index of the node to find a neighbor of
|
||||||
\param direction which way to find the adjacent node relative to
|
\param direction which way to find the adjacent node relative to
|
||||||
this one. Each successive bit selects the direction for the
|
this one. Each successive bit selects the direction for the
|
||||||
corresponding dimension: for an Octree in 3D, 010 means: negative
|
corresponding dimension: for an octree in 3D, 010 means: negative
|
||||||
direction in X, position direction in Y, negative direction in Z.
|
direction in X, position direction in Y, negative direction in Z.
|
||||||
|
|
||||||
\return the index of the adjacent node if it exists, nothing otherwise.
|
\return the index of the adjacent node if it exists, nothing otherwise.
|
||||||
|
|
@ -1105,7 +1105,7 @@ public:
|
||||||
// The first two bits indicate the dimension/axis (x, y, z)
|
// The first two bits indicate the dimension/axis (x, y, z)
|
||||||
uint8_t dimension = uint8_t((direction >> 1).to_ulong());
|
uint8_t dimension = uint8_t((direction >> 1).to_ulong());
|
||||||
|
|
||||||
// Create an offset so that the bit-significance lines up with the dimension (e.g. 1, 2, 4 --> 001, 010, 100)
|
// Create an offset so that the bit-significance lines up with the dimension (e.g., 1, 2, 4 --> 001, 010, 100)
|
||||||
int8_t offset = (uint8_t) 1 << dimension;
|
int8_t offset = (uint8_t) 1 << dimension;
|
||||||
|
|
||||||
// Finally, apply the sign to the offset
|
// Finally, apply the sign to the offset
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ namespace Orthtrees {
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgOrthtreeNeighbors
|
\ingroup PkgOrthtreeNeighbors
|
||||||
\brief finds the `k` points within a specific radius that are
|
\brief finds the `k` points within a specific radius that are
|
||||||
nearest to the center of `query_sphere`.
|
nearest to the center of the sphere `query`.
|
||||||
|
|
||||||
This function guarantees that there are no closer points than the ones returned,
|
This function guarantees that there are no closer points than the ones returned,
|
||||||
but it does not guarantee that it will return at least `k` points.
|
but it does not guarantee that it will return at least `k` points.
|
||||||
|
|
@ -132,14 +132,14 @@ namespace Orthtrees {
|
||||||
\tparam OutputIterator must be a model of `OutputIterator` that accepts points
|
\tparam OutputIterator must be a model of `OutputIterator` that accepts points
|
||||||
|
|
||||||
\param orthtree the tree to search within
|
\param orthtree the tree to search within
|
||||||
\param query_sphere the region to search within
|
\param query the region to search within
|
||||||
\param k the number of points to find
|
\param k the number of points to find
|
||||||
\param output the output iterator to add the found points to (in order of increasing distance)
|
\param output the output iterator to add the found points to (in order of increasing distance)
|
||||||
*/
|
*/
|
||||||
template <typename Tree, typename OutputIterator>
|
template <typename Tree, typename OutputIterator>
|
||||||
OutputIterator nearest_k_neighbors_in_radius(
|
OutputIterator nearest_k_neighbors_in_radius(
|
||||||
const Tree& orthtree,
|
const Tree& orthtree,
|
||||||
typename Tree::Sphere& query_sphere,
|
typename Tree::Sphere& query,
|
||||||
std::size_t k,
|
std::size_t k,
|
||||||
OutputIterator output
|
OutputIterator output
|
||||||
) {
|
) {
|
||||||
|
|
@ -156,7 +156,7 @@ OutputIterator nearest_k_neighbors_in_radius(
|
||||||
points_list.reserve(k);
|
points_list.reserve(k);
|
||||||
|
|
||||||
// Invoking the recursive function adds those points to the vector (passed by reference)
|
// Invoking the recursive function adds those points to the vector (passed by reference)
|
||||||
CGAL::internal::nearest_k_neighbors_recursive(orthtree, query_sphere, orthtree.root(), points_list);
|
CGAL::internal::nearest_k_neighbors_recursive(orthtree, query, orthtree.root(), points_list);
|
||||||
|
|
||||||
// Add all the points found to the output
|
// Add all the points found to the output
|
||||||
for (auto& item: points_list)
|
for (auto& item: points_list)
|
||||||
|
|
@ -168,13 +168,13 @@ OutputIterator nearest_k_neighbors_in_radius(
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgOrthtreeNeighbors
|
\ingroup PkgOrthtreeNeighbors
|
||||||
\brief finds the `k` nearest neighbors of `query`.
|
\brief finds the `k` nearest neighbors of the point `query`.
|
||||||
|
|
||||||
Nearest neighbors are outputted in order of increasing distance to
|
Nearest neighbors are outputted in order of increasing distance to
|
||||||
`query`.
|
`query`.
|
||||||
|
|
||||||
\tparam Tree must be an orthtree with traits which are a model of CollectionPartitioningOrthtreeTraits
|
\tparam Tree must be an orthtree with traits which are a model of `CollectionPartitioningOrthtreeTraits`
|
||||||
\tparam OutputIterator a model of `OutputIterator` that accept `Point_d` objects.
|
\tparam OutputIterator a model of `OutputIterator` that accepts `Point_d` objects.
|
||||||
|
|
||||||
\param orthtree the tree to search within
|
\param orthtree the tree to search within
|
||||||
\param query query point.
|
\param query query point.
|
||||||
|
|
@ -191,13 +191,13 @@ OutputIterator nearest_neighbors(const Tree& orthtree, const typename Tree::Poin
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgOrthtreeNeighbors
|
\ingroup PkgOrthtreeNeighbors
|
||||||
\brief finds the points in `sphere`.
|
\brief finds the points in the sphere `query`.
|
||||||
|
|
||||||
Nearest neighbors are outputted in order of increasing distance to
|
Nearest neighbors are outputted in order of increasing distance to
|
||||||
the center of `sphere`.
|
the center of the sphere.
|
||||||
|
|
||||||
\tparam Tree must be an orthtree with traits which are a model of CollectionPartitioningOrthtreeTraits
|
\tparam Tree must be an orthtree with traits which are a model of `CollectionPartitioningOrthtreeTraits`
|
||||||
\tparam OutputIterator a model of `OutputIterator` that accept `Point_d` objects.
|
\tparam OutputIterator a model of `OutputIterator` that accepts `Point_d` objects.
|
||||||
|
|
||||||
\param orthtree the tree to search within
|
\param orthtree the tree to search within
|
||||||
\param query query sphere.
|
\param query query sphere.
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace CGAL {
|
||||||
the documentation of `Orthtree`.
|
the documentation of `Orthtree`.
|
||||||
|
|
||||||
\tparam GeomTraits must be a model of `Kernel`
|
\tparam GeomTraits must be a model of `Kernel`
|
||||||
\tparam PointRange_ 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::Point_2`
|
\tparam PointMap must be a model of `ReadablePropertyMap` whose value type is `GeomTraits::Point_2`
|
||||||
*/
|
*/
|
||||||
template <typename GeomTraits, typename PointRange,
|
template <typename GeomTraits, typename PointRange,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue