CGAL 5.6.2 - 2D Straight Skeleton and Polygon Offsetting
|
The following functions are used to construct the inward or outward weighted straight skeleton of a polygon.
Functions | |
template<typename PointIterator , typename HoleIterator , typename WeightIterator , typename HoleWeightsIterator , typename SsK > | |
boost::shared_ptr< Straight_skeleton_2< SsK > > | CGAL::create_interior_weighted_straight_skeleton_2 (PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, HoleIterator holes_begin, HoleIterator holes_end, WeightIterator outer_contour_weights_begin, WeightIterator outer_contour_weights_end, HoleWeightsIterator holes_weights_begin, HoleWeightsIterator holes_weights_end, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel()) |
creates a weighted straight skeleton in the interior of a 2D polygon with holes. More... | |
template<typename PointIterator , typename WeightIterator , typename SsK > | |
boost::shared_ptr< Straight_skeleton_2< SsK > > | CGAL::create_interior_weighted_straight_skeleton_2 (PointIterator outer_contour_vertices_begin, PointIterator outer_contour_vertices_end, WeightIterator outer_contour_weights_begin, WeightIterator outer_contour_weights_end, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel()) |
creates a weighted straight skeleton in the interior of a 2D polygon without holes. More... | |
template<typename InKPolygon , typename InKWeights , typename SsK > | |
boost::shared_ptr< Straight_skeleton_2< SsK > > | CGAL::create_interior_weighted_straight_skeleton_2 (const InKPolygon &polygon, const InKWeights &weights, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel()) |
creates a weighted straight skeleton in the interior of a 2D polygon, possibly with holes. More... | |
template<typename FT , typename PointIterator , typename WeightIterator , typename SsK > | |
boost::shared_ptr< Straight_skeleton_2< SsK > > | CGAL::create_exterior_weighted_straight_skeleton_2 (FT max_offset, PointIterator vertices_begin, PointIterator vertices_end, WeightIterator weights_begin, WeightIterator weights_end, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel()) |
creates a weighted straight skeleton in the limited exterior of the 2D polygon P given by the point sequence [vertices_begin,vertices_end[ . More... | |
template<typename FT , typename Polygon , typename Weights , typename SsK > | |
boost::shared_ptr< Straight_skeleton_2< SsK > > | CGAL::create_exterior_weighted_straight_skeleton_2 (FT max_offset, const InKPolygon &P, const InKWeights &weights, SsK k=CGAL::Exact_predicates_inexact_constructions_kernel()) |
creates a weighted straight skeleton in the exterior of a 2D polygon (with holes). More... | |
boost::shared_ptr< Straight_skeleton_2<SsK> > CGAL::create_exterior_weighted_straight_skeleton_2 | ( | FT | max_offset, |
PointIterator | vertices_begin, | ||
PointIterator | vertices_end, | ||
WeightIterator | weights_begin, | ||
WeightIterator | weights_end, | ||
SsK | k = CGAL::Exact_predicates_inexact_constructions_kernel() |
||
) |
#include <CGAL/create_weighted_straight_skeleton_2.h>
creates a weighted straight skeleton in the limited exterior of the 2D polygon P
given by the point sequence [vertices_begin,vertices_end[
.
The skeleton in the limited exterior of P
is the skeleton in the interior of a polygon Q
with P
as its hole and a rectangular frame F
as outer boundary. The outer boundary F
is constructed by enlarging the bounding box of P
by a distance d
. The distance d
is a margin sufficiently large to allow an outer offset at distance max_offset
to be obtained from this exterior skeleton, as computed by the function compute_outer_frame_margin()
.
Weights must be provided in the same order as the vertices of the polygon: the i
-th weight in the range is associated to the contour edge between the i-1
-th and i
-th vertices.
SsK | must be a model of Kernel . |
FT | must be a model of FieldNumberType convertible to SsK::FT . |
PointIterator | must be a model of InputIterator with value type InK::Point_2 . |
WeightIterator | must be a model of InputIterator with value_type InK::FT . |
Cartesian_converter
and NT_converter
are used to convert objects from InK
to SsK
, if they differ.vertices_begin
and vertices_end
describe a weakly simple polygon that is oriented counterclockwise. boost::shared_ptr< Straight_skeleton_2<SsK> > CGAL::create_exterior_weighted_straight_skeleton_2 | ( | FT | max_offset, |
const InKPolygon & | P, | ||
const InKWeights & | weights, | ||
SsK | k = CGAL::Exact_predicates_inexact_constructions_kernel() |
||
) |
#include <CGAL/create_weighted_straight_skeleton_2.h>
creates a weighted straight skeleton in the exterior of a 2D polygon (with holes).
The function returns a straight skeleton in the limited exterior of the 2D polygon P
. The skeleton in the limited exterior of P
is the skeleton in the interior of a polygon Q
with P
as its hole and a rectangular frame F
as outer boundary. The outer boundary F
is constructed by enlarging the bounding box of P
a distance d
. d
is a margin sufficiently large to allow an outer offset at distance max_offset
to be obtained from this exterior skeleton, as computed by the function compute_outer_frame_margin()
.
Weights must be provided in the same order as the vertices of the polygon: the i
-th weight in the range is associated to the contour edge between the i-1
-th and i
-th vertices.
P
are ignored. If you also need the exterior skeleton for the holes, you should call CGAL::create_interior_straight_skeleton_2()
for each hole.SsK | must be a model of Kernel . |
FT | must be a model of FieldNumberType convertible to SsK::FT . |
InKPolygon | must be a model of SequenceContainer with value type InK::Point_2 (e.g. Polygon_2<InK> ) or a model of GeneralPolygonWithHoles_2 (e.g. Polygon_with_holes_2<InK> ). |
InKWeights | must be a model of Range whose value type is itself a model of Range with value type InK::FT . |
Cartesian_converter
and NT_converter
are used to convert objects from InK
to SsK
, if they differ.P
is a weakly simple, counterclockwise polygon with clockwise oriented holes. max_offset
must be positive.boost::shared_ptr< Straight_skeleton_2<SsK> > CGAL::create_interior_weighted_straight_skeleton_2 | ( | PointIterator | outer_contour_vertices_begin, |
PointIterator | outer_contour_vertices_end, | ||
HoleIterator | holes_begin, | ||
HoleIterator | holes_end, | ||
WeightIterator | outer_contour_weights_begin, | ||
WeightIterator | outer_contour_weights_end, | ||
HoleWeightsIterator | holes_weights_begin, | ||
HoleWeightsIterator | holes_weights_end, | ||
SsK | k = CGAL::Exact_predicates_inexact_constructions_kernel() |
||
) |
#include <CGAL/create_weighted_straight_skeleton_2.h>
creates a weighted straight skeleton in the interior of a 2D polygon with holes.
The outer contour is given by the point sequence [outer_contour_vertices_begin, outer_contour_vertices_end]
and its holes are given by [holes_begin,holes_end[
. Weights of the outer contour are given by [outer_contour_weights_begin, outer_contour_weights_end[
, and weights of the holes are given by [holes_weights_begin, holes_weights_end]
, in the same order as holes appear in the iterator range. Within each weight range, weights are given in the same order as the vertices of the contour: the i
-th weight in the range is associated to the contour edge between the i-1
-th and i
-th vertices.
PointIterator | must be a model of InputIterator with value type InK::Point_2 . |
HoleIterator | must be a model of InputIterator with value_type a model of SequenceContainer with value type InK::Point_2 . |
WeightIterator | must be a model of InputIterator with value_type InK::FT . |
HoleWeightsIterator | must be a model of InputIterator with value_type a model of SequenceContainer with value type InK::FT . |
SsK | must be a model of Kernel . |
Cartesian_converter
and NT_converter
are used to convert objects from InK
to SsK
, if they differ.[outer_contour_vertices_begin, outer_contour_vertices_end[
describes a weakly simple polygon that is oriented counterclockwise. \pre the range [holes_begin, holes_end[
describes a sequence of weakly simple polygons that are oriented clockwise. boost::shared_ptr< Straight_skeleton_2<SsK> > CGAL::create_interior_weighted_straight_skeleton_2 | ( | PointIterator | outer_contour_vertices_begin, |
PointIterator | outer_contour_vertices_end, | ||
WeightIterator | outer_contour_weights_begin, | ||
WeightIterator | outer_contour_weights_end, | ||
SsK | k = CGAL::Exact_predicates_inexact_constructions_kernel() |
||
) |
#include <CGAL/create_weighted_straight_skeleton_2.h>
creates a weighted straight skeleton in the interior of a 2D polygon without holes.
The outer contour is given by the point sequence [outer_contour_vertices_begin, outer_contour_vertices_end]
. Weights of the outer contour are given by [outer_contour_weights_begin, outer_contour_weights_end]
, appearing in the same order as the vertices of the contour: the i
-th weight in the range is associated to the contour edge between the i-1
-th and i
-th vertices.
PointIterator | must be a model of InputIterator with value type InK::Point_2 . |
WeightIterator | must be a model of InputIterator with value_type InK::FT . |
SsK | must be a model of Kernel . |
Cartesian_converter
and NT_converter
are used to convert objects from InK
to SsK
, if they differ.[outer_contour_vertices_begin, outer_contour_vertices_end[
describes a weakly simple polygon that is oriented counterclockwise. boost::shared_ptr< Straight_skeleton_2<SsK> > CGAL::create_interior_weighted_straight_skeleton_2 | ( | const InKPolygon & | polygon, |
const InKWeights & | weights, | ||
SsK | k = CGAL::Exact_predicates_inexact_constructions_kernel() |
||
) |
#include <CGAL/create_weighted_straight_skeleton_2.h>
creates a weighted straight skeleton in the interior of a 2D polygon, possibly with holes.
Range of weights weights
must be provided in the same order as the contours (i.e., first the weights of the outer boundary, and then the weights of the holes, if there are any). Within each range of weights, the weights must be given in the same order as the vertices of the contour: the i
-th weight in the range is associated to the contour edge between the i-1
-th and i
-th vertices.
InKPolygon | must be a model of SequenceContainer with value type InK::Point_2 (e.g. Polygon_2<InK> ), or a model of GeneralPolygonWithHoles_2 (e.g. Polygon_with_holes_2<InK> ). |
InKWeights | must be a model of Range whose value type is itself a model of Range with value type InK::FT . |
SsK | must be a model of Kernel . |
Cartesian_converter
and NT_converter
are used to convert objects from InK
to SsK
, if they differ.polygon
is a weakly simple, counterclockwise polygon with clockwise oriented holes.