add a method number_of_points()

This commit is contained in:
Sébastien Loriot 2014-09-18 19:55:22 +02:00
parent 1d0e2e4487
commit d4d4f8a857
1 changed files with 9 additions and 14 deletions

View File

@ -287,7 +287,6 @@ public:
* it was previously estimated. * it was previously estimated.
* *
* \sa `insert(const Point& p)`. * \sa `insert(const Point& p)`.
* \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
* \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`. * \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
*/ */
template < class InputIterator > template < class InputIterator >
@ -362,8 +361,7 @@ public:
/// gives the squared radius of the neighborhood. /// gives the squared radius of the neighborhood.
/** The neighborhood radius is used by /** The neighborhood radius is used by
* <code>[increase_scale(...)](\ref increase_scale)</code> and * <code>[increase_scale(...)](\ref increase_scale)</code> to
* <code>[construct_scale_space(...)](\ref construct_scale_space)</code> to
* compute the point set at the desired scale and by * compute the point set at the desired scale and by
* <code>[reconstruct_surface(...)](\ref reconstruct_surface)</code> to * <code>[reconstruct_surface(...)](\ref reconstruct_surface)</code> to
* construct a surface from the point set at the current scale. * construct a surface from the point set at the current scale.
@ -372,7 +370,6 @@ public:
* neighborhood radius has not yet been set. * neighborhood radius has not yet been set.
* *
* \sa `increase_scale(unsigned int iterations)`. * \sa `increase_scale(unsigned int iterations)`.
* \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
* \sa `reconstruct_surface(unsigned int iterations)`. * \sa `reconstruct_surface(unsigned int iterations)`.
* \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`. * \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
*/ */
@ -417,8 +414,7 @@ public:
/// sets the squared radius of the neighborhood. /// sets the squared radius of the neighborhood.
/** The neighborhood radius is used by /** The neighborhood radius is used by
* <code>[increase_scale(...)](\ref increase_scale)</code> and * <code>[increase_scale(...)](\ref increase_scale)</code> to
* <code>[construct_scale_space(...)](\ref construct_scale_space)</code> to
* compute the point set at the desired scale and by * compute the point set at the desired scale and by
* <code>[reconstruct_surface(...)](\ref reconstruct_surface)</code> to * <code>[reconstruct_surface(...)](\ref reconstruct_surface)</code> to
* construct a surface from the point set at the current scale. * construct a surface from the point set at the current scale.
@ -435,7 +431,6 @@ public:
* \sa `neighborhood_squared_radius()`. * \sa `neighborhood_squared_radius()`.
* \sa `has_neighborhood_radius()`. * \sa `has_neighborhood_radius()`.
* \sa `increase_scale(unsigned int iterations)`. * \sa `increase_scale(unsigned int iterations)`.
* \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
* \sa `reconstruct_surface(unsigned int iterations)`. * \sa `reconstruct_surface(unsigned int iterations)`.
* \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`. * \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
*/ */
@ -556,7 +551,6 @@ public:
* \sa `estimate_neighborhood_radius(InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples)`. * \sa `estimate_neighborhood_radius(InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples)`.
* \sa `estimate_neighborhood_radius()`. * \sa `estimate_neighborhood_radius()`.
* \sa `insert(InputIterator begin, InputIterator end)`. * \sa `insert(InputIterator begin, InputIterator end)`.
* \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
* \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`. * \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
*/ */
template < class InputIterator > template < class InputIterator >
@ -624,12 +618,12 @@ public:
* \note If the surface was already constructed, increasing the scale * \note If the surface was already constructed, increasing the scale
* will not automatically adjust the surface. * will not automatically adjust the surface.
* *
* \sa `construct_scale_space(InputIterator begin, InputIterator end, unsigned int iterations)`.
* \sa `estimate_neighborhood_radius()`. * \sa `estimate_neighborhood_radius()`.
* \sa `reconstruct_surface(unsigned int iterations)`. * \sa `reconstruct_surface(unsigned int iterations)`.
*/ */
void increase_scale( unsigned int iterations = 1 ); void increase_scale( unsigned int iterations = 1 );
#ifndef DOXYGEN_RUNNING
/// constructs a scale-space of a collection of points. /// constructs a scale-space of a collection of points.
/** If the neighborhood radius has not been set before, it is automatically /** If the neighborhood radius has not been set before, it is automatically
* estimated using `estimate_neighborhood_radius()`. * estimated using `estimate_neighborhood_radius()`.
@ -653,16 +647,13 @@ public:
* \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`. * \sa `reconstruct_surface(InputIterator begin, InputIterator end, unsigned int iterations)`.
*/ */
template < class InputIterator > template < class InputIterator >
#ifdef DOXYGEN_RUNNING
void construct_scale_space( InputIterator begin, InputIterator end, unsigned int iterations = 1 ) {
#else // DOXYGEN_RUNNING
void construct_scale_space( InputIterator begin, InputIterator end, unsigned int iterations = 1, void construct_scale_space( InputIterator begin, InputIterator end, unsigned int iterations = 1,
typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) { typename boost::enable_if< CGAL::is_iterator<InputIterator> >::type* = NULL ) {
#endif // DOXYGEN_RUNNING
clear(); clear();
insert( begin, end ); insert( begin, end );
increase_scale( iterations ); increase_scale( iterations );
} }
#endif // DOXYGEN_RUNNING
/// \} /// \}
private: private:
@ -746,6 +737,10 @@ public:
/// gives the number of triangles of the surface. /// gives the number of triangles of the surface.
std::size_t number_of_triangles() const { return _surface.size(); } std::size_t number_of_triangles() const { return _surface.size(); }
/// gives the number of points of the surface.
std::size_t number_of_points() const { return _tree.size(); }
/// gives the number of shells of the surface. /// gives the number of shells of the surface.
std::size_t number_of_shells() const { std::size_t number_of_shells() const {
CGAL_assertion( Sh::value == true ); CGAL_assertion( Sh::value == true );