\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.13 - Point Set Shape Detection
CGAL::Shape_detection_3::Point_to_shape_index_map< Traits > Class Template Reference

#include <CGAL/Shape_detection_3/property_maps.h>


Property map that associate a point index to its assigned shape found by a shape detection algorithm (such as CGAL::Shape_detection_3::Efficient_RANSAC or CGAL::Shape_detection_3::Region_growing).


Public Types

typedef std::size_t key_type
 Index of the point in the random access point range.
typedef int value_type
 Index of the shape (-1 if the point is not assigned to any shape).
typedef value_type reference
typedef boost::readable_property_map_tag category

Public Member Functions

template<typename PointRange , typename ShapeRange >
 Point_to_shape_index_map (const PointRange &points, const ShapeRange &shapes)
 Constructs a property map to map points to their associated shape. More...


value_type get (const Point_to_shape_index_map &pm, const key_type &k)

Constructor & Destructor Documentation

◆ Point_to_shape_index_map()

template<typename Traits >
template<typename PointRange , typename ShapeRange >
CGAL::Shape_detection_3::Point_to_shape_index_map< Traits >::Point_to_shape_index_map ( const PointRange &  points,
const ShapeRange &  shapes 

Constructs a property map to map points to their associated shape.

shapes must be a range of shapes detected using points.
Template Parameters
ShapeRangean Iterator_range with a bidirectional constant iterator type with value type boost::shared_ptr<CGAL::Shape_detection_3::Shape_base<Traits> >.