\( \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.11 - Point Set Processing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Point_set_with_structure< Traits > Class Template Reference

#include <CGAL/structure_point_set.h>

Definition

A 3D point set with structure information based on a set of detected planes.

Given a point set in 3D space along with a set of fitted planes, this class stores a simplified and structured version of the point set. Each output point is assigned to one, two or more primitives (depending wether it belongs to a planar section, an edge or a if it is a vertex). The implementation follow [6].

Template Parameters
Traitsa model of EfficientRANSACTraits that must provide in addition a function Intersect_3 intersection_3_object() const and a functor Intersect_3 with:
  • boost::optional< boost::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)
  • boost::optional< boost::variant< Traits::Line_3, Traits::Point_3 > > operator()(typename Traits::Line_3, typename Traits::Plane_3)

Public Types

enum  Coherence_type {
  INCOHERENT = -1, FREEFORM = 0, VERTEX = 1, CREASE = 2,
  PLANAR = 3
}
 Tag classifying the coherence of a triplet of points with respect to an inferred surface. More...
 
typedef Traits::Point_3 Point
 
typedef Traits::Vector_3 Vector
 
typedef Traits::Point_map Point_map
 
typedef Traits::Normal_map Normal_map
 
typedef Traits::Input_range Input_range
 
typedef Input_range::iterator Input_iterator
 
typedef
Shape_detection_3::Plane
< Traits > 
Plane_shape
 

Public Member Functions

 Point_set_with_structure (Input_iterator begin, Input_iterator end, Point_map point_map, Normal_map normal_map, const Shape_detection_3::Efficient_RANSAC< Traits > &shape_detection, double epsilon, double attraction_factor=3.)
 Constructs a structured point set based on the input points and the associated shape detection object. More...
 
std::size_t size () const
 
std::pair< Point, Vectoroperator[] (std::size_t i) const
 
const Pointpoint (std::size_t i) const
 
const Vectornormal (std::size_t i) const
 
std::vector< boost::shared_ptr
< Plane_shape > > 
adjacency (std::size_t i) const
 Returns all Plane_shape objects that are adjacent to the point with index i. More...
 
Coherence_type facet_coherence (const CGAL::cpp11::array< std::size_t, 3 > &f) const
 Computes the coherence of a facet between the 3 points indexed by f with respect to the underlying structure.
 

Member Enumeration Documentation

template<typename Traits >
enum CGAL::Point_set_with_structure::Coherence_type

Tag classifying the coherence of a triplet of points with respect to an inferred surface.

Enumerator
INCOHERENT 

Incoherent (facet violates the underlying structure)

FREEFORM 

Free-form coherent (facet is between 3 free-form points)

VERTEX 

Structure coherent, facet adjacent to a vertex.

CREASE 

Structure coherent, facet adjacent to an edge.

PLANAR 

Structure coherent, facet inside a planar section.

Constructor & Destructor Documentation

template<typename Traits >
CGAL::Point_set_with_structure< Traits >::Point_set_with_structure ( Input_iterator  begin,
Input_iterator  end,
Point_map  point_map,
Normal_map  normal_map,
const Shape_detection_3::Efficient_RANSAC< Traits > &  shape_detection,
double  epsilon,
double  attraction_factor = 3. 
)

Constructs a structured point set based on the input points and the associated shape detection object.

Note
Both property maps can be omitted if the default constructors of these property maps can be safely used.
Parameters
beginiterator over the first input point.
endpast-the-end iterator over the input points.
point_mapproperty map: value_type of InputIterator -> Point_3.
normal_mapproperty map: value_type of InputIterator -> Vector_3.
shape_detectionshape detection object
epsilonsize parameter
attraction_factorattraction factor

Member Function Documentation

template<typename Traits >
std::vector<boost::shared_ptr<Plane_shape> > CGAL::Point_set_with_structure< Traits >::adjacency ( std::size_t  i) const

Returns all Plane_shape objects that are adjacent to the point with index i.

Note
Points not adjacent to any plane are free-form points, points adjacent to 1 plane are planar points, points adjacent to 2 planes are edge points and points adjacent to 3 or more planes are vertices.