CGAL 6.0 - 2D and 3D Linear Geometry Kernel
Loading...
Searching...
No Matches
CGAL::Projection_traits_xy_3< K > Class Template Reference

#include <CGAL/Projection_traits_xy_3.h>

Definition

template<typename K>
class CGAL::Projection_traits_xy_3< K >

The class Projection_traits_xy_3 is an adapter to apply 2D algorithms to the projections of 3D data on the xy-plane.

CGAL provides also predefined geometric traits classes Projection_traits_yz_3<K> and Projection_traits_xz_3<K> to deal with projections on the zx- and the zy-plane, respectively.

Template Parameters
Kmust be a model of Kernel.
Note
Internal constructions (projections) are used in the predicate and construction functors of this class. If K is a model of Kernel providing exact constructions or if K is a CGAL::Filtered_kernel (such as for CGAL::Exact_predicates_inexact_constructions_kernel), this class automatically provides exact predicates.
Is model of
The class is a model of several 2D triangulation traits class concepts, except that it does not provide the type and constructors required to build the dual Voronoi diagram.
PolygonTraits_2
ConvexHullTraits_2
TriangulationTraits_2
DelaunayTriangulationTraits_2
ConstrainedTriangulationTraits_2
ConvexHullTraits_2
DelaunayMeshTraits_2
AnalyticWeightTraits_2
Barycentric_coordinates::BarycentricTraits_2
See also
CGAL::Projection_traits_3

Types

typedef Point_3< K > Point_2
 
typedef Segment_3< K > Segment_2
 
typedef Triangle_3< K > Triangle_2
 
typedef Line_3< K > Line_2
 

Functors

The functors provided by this class are those listed in the concepts, except that it does not provide the type and constructors required to build the dual Voronoi diagram.

The functors operate on the 2D projection of their arguments. They come with preconditions that projections of the arguments are non-degenerate, eg. a line segment does not project on a single point, two points do not project on the same point, etc. In the following, we specify the choice of the z-coordinate in case a new point is constructed.

typedef unspecified_type Intersect_2
 A construction object.
 

Creation

 Projection_traits_xy_3 ()
 default constructor.
 
 Projection_traits_xy_3 (Projection_traits_xy_3 tr)
 Copy constructor.
 
Projection_traits_xy_3 operator= (Projection_traits_xy_3 tr)
 Assignment operator.
 

Member Typedef Documentation

◆ Intersect_2

template<typename K >
typedef unspecified_type CGAL::Projection_traits_xy_3< K >::Intersect_2

A construction object.

Provides the operator :

std::optional< std::variant<Point_2,Segment_2> > operator()(Segment_2 s1, Segment_2 s2); which returns a 3D object whose projection on the xy-plane is the intersection of the projections of s1 and s2. If non empty, the returned object is either a segment or a point. Its embedding in 3D is computed as the interpolation between s1 and s2, meaning that any point p of the returned object is the midpoint of segment p1p2 where p1 and p2 are the two points of s1 and s2 respectively, both projecting on p.

Precondition
The projection of s1 and the projection of s2 are non-degenerate 2D segments.