\( \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.12.1 - 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>

Definition

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).

Examples:
Point_set_shape_detection_3/plane_regularization.cpp.

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...
 

Friends

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.

Note
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> >.