\( \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 5.0.2 - Shape Detection
CGAL::Shape_detection::Point_to_shape_index_map< Traits > Class Template Reference

#include <CGAL/Shape_detection/Efficient_RANSAC/property_map.h>

Definition

Property map that associates a point index to its assigned shape found by the CGAL::Shape_detection::Efficient_RANSAC algorithm.

Examples:
Shape_detection/efficient_RANSAC_and_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::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
ShapeRangemust be an Iterator_range with a bidirectional constant iterator type with value type boost::shared_ptr<CGAL::Shape_detection::Shape_base<Traits> >.