CGAL 6.0.2 - Point Set Processing

Loading...
Searching...
No Matches
List of all members | Classes | Public Types | Public Member Functions
CGAL::Point_set_with_structure< Kernel > Class Template Reference
Point Set Processing Reference » Algorithms

`#include <CGAL/structure_point_set.h>`

## Definition

template<typename Kernel>
class CGAL::Point_set_with_structure< Kernel >

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

  Kernel | a model of `EfficientRANSACTraits` that must provide in addition a function `Intersect_3 intersection_3_object() const` and a functor `Intersect_3` with: `std::optional< std::variant< Traits::Plane_3, Traits::Line_3 > > operator()(typename Traits::Plane_3, typename Traits::Plane_3)` `std::optional< std::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.
std::size_t | size () const
std::pair< Point, Vector > | operator[] (std::size_t i) const
const Point & | point (std::size_t i) const
const Vector & | normal (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`.
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

  PointRange | is a model of `ConstRange`. The value type of its iterator is the key type of the named parameter `point_map`.
  PlaneRange | is a model of `ConstRange`. The value type of its iterator is the key type of the named parameter `plane_map`.

Parameters

  points | input point range
  planes | input plane range.
  epsilon | size parameter.
  np | a 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. |
  a property map containing the planes associated to the elements of the plane range `planes` Type: a class model of `ReadablePropertyMap` with `PlaneRange::iterator::value_type` as key type and `geom_traits::Plane_3` as value type Default: `CGAL::Identity_property_map<Kernel::Plane_3>` |
  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.