\( \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.2 - Point Set Processing
CGAL::Point_set_with_structure< Kernel > 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
Kernela model of ShapeDetectionTraits 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 Kernel::Point_3 Point
 
typedef Kernel::Vector_3 Vector
 
typedef Kernel::Plane_3 Plane
 

Public Member Functions

template<typename PointRange , typename PlaneRange , typename NamedParameters >
 Point_set_with_structure (const PointRange &points, const PlaneRange &planes, double epsilon, const NamedParameters &np)
 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
 
template<typename OutputIterator >
void adjacency (std::size_t i, OutputIterator output) 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

◆ Coherence_type

template<typename Kernel >
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

◆ Point_set_with_structure()

template<typename Kernel >
template<typename PointRange , typename PlaneRange , typename NamedParameters >
CGAL::Point_set_with_structure< Kernel >::Point_set_with_structure ( const PointRange &  points,
const PlaneRange &  planes,
double  epsilon,
const NamedParameters &  np 
)

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

Template Parameters
PointRangeis a model of ConstRange. The value type of its iterator is the key type of the named parameter point_map.
PlaneRangeis a model of ConstRange. The value type of its iterator is the key type of the named parameter plane_map.
Parameters
pointsinput point range.
planesinput plane range.
epsilonsize parameter.
npoptional sequence of Named Parameters among the ones listed below.
Named Parameters
point_mapa model of ReadablePropertyMap with value type Kernel::Point_3. If this parameter is omitted, CGAL::Identity_property_map<Kernel::Point_3> is used.
normal_mapa model of ReadablePropertyMap with value type Kernel::Vector_3.
plane_index_mapa model of ReadablePropertyMap with value type int. Associates the index of a point in the input range to the index of plane (-1 if point does is not assigned to a plane).
plane_mapa model of ReadablePropertyMap with value type Kernel::Plane_3. If this parameter is omitted, CGAL::Identity_property_map<Kernel::Plane_3> is used.
attraction_factormultiple of epsilon used to connect simplices.

Member Function Documentation

◆ adjacency()

template<typename Kernel >
template<typename OutputIterator >
void CGAL::Point_set_with_structure< Kernel >::adjacency ( std::size_t  i,
OutputIterator  output 
) 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.