CGAL 6.2 - 2D Alpha Wrapping
Loading...
Searching...
No Matches
Free Functions

Functions to create a wrap from point clouds, segment soups, and polygons with holes.

Functions

template<typename PointRange , typename FaceRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const PointRange &points, const FaceRange &faces, const double alpha, const double offset, MultipolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains an input indexed face set.
 
template<typename TriangleRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const TriangleRange &triangles, const double alpha, const double offset, MultipolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains an input triangle soup.
 
template<typename InputMultiPolygonWithHoles , typename OutputMultiPolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const InputMultiPolygonWithHoles &multipolygon, const double alpha, const double offset, OutputMultiPolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains an input range of polygons.
 
template<typename SegmentRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const SegmentRange &segments, const double alpha, const double offset, MultipolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains an input segment soup.
 
template<typename MultiLineString , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const MultiLineString &multilinestring, const double alpha, const double offset, MultipolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains input polylines.
 
template<typename PointRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 (const PointRange &points, const double alpha, const double offset, MultipolygonWithHoles &alpha_wrap, const InputNamedParameters &np)
 computes a watertight, 1-manifold, simple multipolygon that strictly contains an input point set.
 

Function Documentation

◆ alpha_wrap_2() [1/6]

template<typename InputMultiPolygonWithHoles , typename OutputMultiPolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const InputMultiPolygonWithHoles &  multipolygon,
const double  alpha,
const double  offset,
OutputMultiPolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains an input range of polygons.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Note
This function merely inserts and wraps all edges from the outer boundaries and from the holes of the multipolygon. It does not repair the multipolygon first. Consequently, for example, if a polygon were to be invalid with an edge that lays outside of the region enclosed by its outer boundary, then the wrap would still be constructed as to contain this edge. In some use cases, it may be desirable to first repair invalid polygons. We refer to the CGAL component Polygon Repair for various polygon repair functions using different strategies.
Template Parameters
InputMultiPolygonWithHolesa model of MultipolygonWithHoles_2
OutputMultiPolygonWithHolesa model of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
multipolygona multipolygon
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits and the point type of the multipolygon
  • Extra:
    • The geometric traits class must be compatible with the point type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.

◆ alpha_wrap_2() [2/6]

template<typename MultiLineString , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const MultiLineString &  multilinestring,
const double  alpha,
const double  offset,
MultipolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains input polylines.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Template Parameters
MultiLineStringa model of RandomAccessContainer whose value type is a model of RandomAccessContainer whose value type is a point type
MultipolygonWithHolesa model of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
multilinestringthe input polylines
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra:
    • The geometric traits class must be compatible with the segment type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.

◆ alpha_wrap_2() [3/6]

template<typename PointRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const PointRange &  points,
const double  alpha,
const double  offset,
MultipolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains an input point set.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Template Parameters
PointRangemodel of Range whose value type is a point type
MultipolygonWithHolesmodel of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
pointsthe input points
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra:
    • The geometric traits class must be compatible with the point type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.

◆ alpha_wrap_2() [4/6]

template<typename PointRange , typename FaceRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const PointRange &  points,
const FaceRange &  faces,
const double  alpha,
const double  offset,
MultipolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains an input indexed face set.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Template Parameters
PointRangea model of RandomAccessContainer whose value type is the point type
FaceRangea model of Range whose value type is a model of RandomAccessContainer whose value type is an integral type
MultipolygonWithHolesa model of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
pointsthe input points
facesthe input faces, with each element of the range being a range of indices corresponding to points in points
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra:
    • The geometric traits class must be compatible with the point type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.
Examples
Alpha_wrap_2/point_set_wrap_2.cpp, Alpha_wrap_2/polygon_wrap_2.cpp, Alpha_wrap_2/polyline_wrap_2.cpp, and Alpha_wrap_2/triangle_soup_wrap_2.cpp.

◆ alpha_wrap_2() [5/6]

template<typename SegmentRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const SegmentRange &  segments,
const double  alpha,
const double  offset,
MultipolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains an input segment soup.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Template Parameters
SegmentRangea model of Range whose value type is a segment type
MultipolygonWithHolesa model of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
segmentsthe input segments
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra:
    • The geometric traits class must be compatible with the segment type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.

◆ alpha_wrap_2() [6/6]

template<typename TriangleRange , typename MultipolygonWithHoles , typename InputNamedParameters >
void CGAL::alpha_wrap_2 ( const TriangleRange &  triangles,
const double  alpha,
const double  offset,
MultipolygonWithHoles &  alpha_wrap,
const InputNamedParameters &  np 
)

#include <CGAL/alpha_wrap_2.h>

computes a watertight, 1-manifold, simple multipolygon that strictly contains an input triangle soup.

The parameters alpha and offset respectively control which features will appear in the output, and the distance from the input. See Section Choosing Parameters for a detailed breakdown of their influence.

Template Parameters
TriangleRangea model of Range whose value type is a model of RandomAccessContainer of size 3 whose value type is the point type
MultipolygonWithHolesa model of MultipolygonWithHoles_2
InputNamedParametersa sequence of Named Parameters
Parameters
trianglesthe input triangles
alphathe value of the parameter alpha
offsetthe value of the parameter offset
alpha_wrapthe output multipolygon
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • an instance of a geometric traits class
  • Type: a class model of Kernel
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra:
    • The geometric traits class must be compatible with the triangle type.
    • The geometric traits should use a floating point number type (see Interface).
Precondition
alpha and offset are strictly positive values.