CGAL 6.1 - Classification
|
#include <CGAL/Classification/Planimetric_grid.h>
Class that precomputes a 2D planimetric grid.
The grid is composed of squared cells with a user-defined size, each cell containing the list of indices of the points whose projection along the Z-axis lies within this cell. The mapping from each point to the cell it lies in is also stored.
GeomTraits | model of CGAL Kernel. |
PointRange | model of ConstRange . Its iterator type is RandomAccessIterator and its value type is the key type of PointMap . |
PointMap | model of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and value type is GeomTraits::Point_3 . |
Public Types | |
using | Point_3 = typename GeomTraits::Point_3 |
using | Iso_cuboid_3 = typename GeomTraits::Iso_cuboid_3 |
using | iterator = unspecified_type |
A forward iterator with value type std::size_t . | |
Public Member Functions | |
Planimetric_grid (const PointRange &input, PointMap point_map, const Iso_cuboid_3 &bbox, float grid_resolution) | |
constructs a planimetric grid based on the input range. | |
float | resolution () const |
returns the resolution of the grid. | |
std::size_t | width () const |
returns the number of cells along the X-axis. | |
std::size_t | height () const |
returns the number of cells along the Y-axis. | |
iterator | indices_begin (std::size_t x, std::size_t y) const |
returns the begin iterator on the indices of the points lying in the cell at position (x,y) . | |
iterator | indices_end (std::size_t x, std::size_t y) const |
returns the past-the-end iterator on the indices of the points lying in the cell at position (x,y) . | |
bool | has_points (std::size_t x, std::size_t y) const |
returns false if the cell at position (x,y) is empty, true otherwise. | |
std::size_t | x (std::size_t index) const |
returns the x grid coordinate of the point at position index . | |
std::size_t | y (std::size_t index) const |
returns the y grid coordinate of the point at position index . | |
using CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::Iso_cuboid_3 = typename GeomTraits::Iso_cuboid_3 |
using CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::iterator = unspecified_type |
A forward iterator with value type std::size_t
.
using CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::Point_3 = typename GeomTraits::Point_3 |
CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::Planimetric_grid | ( | const PointRange & | input, |
PointMap | point_map, | ||
const Iso_cuboid_3 & | bbox, | ||
float | grid_resolution | ||
) |
constructs a planimetric grid based on the input range.
input | point range. |
point_map | property map to access the input points. |
bbox | bounding box of the input range. |
grid_resolution | resolution of the planimetric grid. |
bool CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::has_points | ( | std::size_t | x, |
std::size_t | y | ||
) | const |
returns false
if the cell at position (x,y)
is empty, true
otherwise.
std::size_t CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::height | ( | ) | const |
returns the number of cells along the Y-axis.
iterator CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::indices_begin | ( | std::size_t | x, |
std::size_t | y | ||
) | const |
returns the begin iterator on the indices of the points lying in the cell at position (x,y)
.
iterator CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::indices_end | ( | std::size_t | x, |
std::size_t | y | ||
) | const |
returns the past-the-end iterator on the indices of the points lying in the cell at position (x,y)
.
float CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::resolution | ( | ) | const |
returns the resolution of the grid.
std::size_t CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::width | ( | ) | const |
returns the number of cells along the X-axis.
std::size_t CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::x | ( | std::size_t | index | ) | const |
returns the x
grid coordinate of the point at position index
.
std::size_t CGAL::Classification::Planimetric_grid< GeomTraits, PointRange, PointMap >::y | ( | std::size_t | index | ) | const |
returns the y
grid coordinate of the point at position index
.