CGAL 5.6.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 whether it belongs to a planar section, an edge or a if it is a vertex). The implementation follow [6].

Template Parameters
Kernela 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 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 std::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.
npa sequence of Named Parameters among the ones listed below:
Optional Named Parameters
  • a property map associating points to the elements of the point set points
  • Type: a model of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and whose value type is geom_traits::Point_3
  • Default: CGAL::Identity_property_map<geom_traits::Point_3>

  • a property map associating normals to the elements of the point set points
  • Type: a model of ReadablePropertyMap whose key type is the value type of the iterator of PointRange and whose value type is geom_traits::Vector_3

  • a property map associating the index of a point in the input range to the index of plane (-1 if the point is not assigned to a plane)
  • Type: a class model of ReadablePropertyMap with std::size_t as key type and int as value type
  • Default: There is no default, this parameters is mandatory.

  • multiple of a tolerance epsilon used to connect simplices
  • Type: floating scalar value
  • Default: 3

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.