\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.9 - 2D Boolean Operations on Nef Polygons
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ExtendedKernelTraits_2 Concept Reference

Definition

ExtendedKernelTraits_2 is a kernel concept providing extended geometryIt is called extended geometry for simplicity, though it is not a real geometry in the classical sense. Let K be an instance of the data type ExtendedKernelTraits_2. The central notion of extended geometry are extended points. An extended point represents either a standard affine point of the Cartesian plane or a non-standard point representing the equivalence class of rays where two rays are equivalent if one is contained in the other.

Let \( R\) be an infinimaximal numberA finite but very large number., \( F\) be the square box with corners \( NW(-R,R)\), \( NE(R,R)\), \( SE(R,-R)\), and \( SW(-R,-R)\). Let \( p\) be a non-standard point and let \( r\) be a ray defining it. If the frame \( F\) contains the source point of \( r\) then let \( p(R)\) be the intersection of \( r\) with the frame \( F\), if \( F\) does not contain the source of \( r\) then \( p(R)\) is undefined. For a standard point let \( p(R)\) be equal to \( p\) if \( p\) is contained in the frame \( F\) and let \( p(R)\) be undefined otherwise. Clearly, for any standard or non-standard point \( p\), \( p(R)\) is defined for any sufficiently large \( R\). Let \( f\) be any function on standard points, say with \( k\) arguments. We call \( f\) extensible if for any \( k\) points \( p_1\), \( \ldots\) , \( p_k\) the function value \( f(p_1(R),\ldots,p_k(R))\) is constant for all sufficiently large \( R\). We define this value as \( f(p_1,\ldots,p_k)\). Predicates like lexicographic order of points, orientation, and incircle tests are extensible.

An extended segment is defined by two extended points such that it is either an affine segment, an affine ray, an affine line, or a segment that is part of the square box. Extended directions extend the affine notion of direction to extended objects.

This extended geometry concept serves two purposes. It offers functionality for changing between standard affine and extended geometry. At the same time it provides extensible geometric primitives on the extended geometric objects.

Has Models:

CGAL::Extended_cartesian<FT>

CGAL::Extended_homogeneous<RT>

CGAL::Filtered_extended_homogeneous<RT>

Affine kernel types

typedef unspecified_type Standard_kernel
 the standard affine kernel.
 
typedef unspecified_type Standard_RT
 the standard ring type.
 
typedef unspecified_type Standard_point_2
 standard points.
 
typedef unspecified_type Standard_segment_2
 standard segments.
 
typedef unspecified_type Standard_line_2
 standard oriented lines.
 
typedef unspecified_type Standard_direction_2
 standard directions.
 
typedef unspecified_type Standard_ray_2
 standard rays.
 
typedef unspecified_type Standard_aff_transformation_2
 standard affine transformations.
 

Extended kernel types

enum  Point_type {
  SWCORNER, LEFTFRAME, NWCORNER, BOTTOMFRAME,
  STANDARD, TOPFRAME, SECORNER, RIGHTFRAME,
  NECORNER
}
 a type descriptor for extended points. More...
 
typedef unspecified_type RT
 the ring type of our extended kernel.
 
typedef unspecified_type Point_2
 extended points.
 
typedef unspecified_type Segment_2
 extended segments.
 
typedef unspecified_type Direction_2
 extended directions.
 

Interfacing the affine kernel types

Point_2 construct_point (const Standard_point_2 &p)
 creates an extended point and initializes it to the standard point p.
 
Point_2 construct_point (const Standard_line_2 &l)
 creates an extended point and initializes it to the equivalence class of all the rays underlying the oriented line l.
 
Point_2 construct_point (const Standard_point_2 &p1, const Standard_point_2 &p2)
 creates an extended point and initializes it to the equivalence class of all the rays underlying the oriented line l(p1,p2).
 
Point_2 construct_point (const Standard_point_2 &p, const Standard_direction_2 &d)
 creates an extended point and initializes it to the equivalence class of all the rays underlying the ray starting in p in direction d.
 
Point_2 construct_opposite_point (const Standard_line_2 &l)
 creates an extended point and initializes it to the equivalence class of all the rays underlying the oriented line opposite to l.
 
Point_type type (const Point_2 &p)
 determines the type of p and returns it.
 
bool is_standard (const Point_2 &p)
 returns true iff p is a standard point.
 
Standard_point_2 standard_point (const Point_2 &p)
 returns the standard point represented by p. More...
 
Standard_line_2 standard_line (const Point_2 &p)
 returns the oriented line representing the bundle of rays defining p. More...
 
Standard_ray_2 standard_ray (const Point_2 &p)
 a ray defining p. More...
 
Point_2 NE ()
 returns the point on the northeast frame corner.
 
Point_2 SE ()
 returns the point on the southeast frame corner.
 
Point_2 NW ()
 returns the point on the northwest frame corner.
 
Point_2 SW ()
 returns the point on the southwest frame corner.
 

Geometric kernel calls

Point_2 source (const Segment_2 &s)
 returns the source point of s.
 
Point_2 target (const Segment_2 &s)
 returns the target point of s.
 
Segment_2 construct_segment (const Point_2 &p, const Point_2 &q)
 constructs a segment pq.
 
int orientation (const Segment_2 &s, const Point_2 &p)
 returns the orientation of p with respect to the line through s.
 
int orientation (const Point_2 &p1, const Point_2 &p2, const Point_2 &p3)
 returns the orientation of p3 with respect to the line through p1p2.
 
bool left_turn (const Point_2 &p1, const Point_2 &p2, const Point_2 &p3)
 return true iff the p3 is left of the line through p1p2.
 
bool is_degenerate (const Segment_2 &s)
 return true iff s is degenerate.
 
int compare_xy (const Point_2 &p1, const Point_2 &p2)
 returns the lexicographic order of p1 and p2.
 
int compare_x (const Point_2 &p1, const Point_2 &p2)
 returns the order on the \( x\)-coordinates of p1 and p2.
 
int compare_y (const Point_2 &p1, const Point_2 &p2)
 returns the order on the \( y\)-coordinates of p1 and p2.
 
Point_2 intersection (const Segment_2 &s1, const Segment_2 &s2)
 returns the point of intersection of the lines supported by s1 and s2. More...
 
Direction_2 construct_direction (const Point_2 &p1, const Point_2 &p2)
 returns the direction of the vector p2 - p1.
 
bool strictly_ordered_ccw (const Direction_2 &d1, const Direction_2 &d2, const Direction_2 &d3)
 returns true iff d2 is in the interior of the counterclockwise angular sector between d1 and d3.
 
bool strictly_ordered_along_line (const Point_2 &p1, const Point_2 &p2, const Point_2 &p3)
 returns true iff p2 is in the relative interior of the segment p1p3.
 
bool contains (const Segment_2 &s, const Point_2 &p)
 returns true iff s contains p.
 
bool first_pair_closer_than_second (const Point_2 &p1, const Point_2 &p2, const Point_2 &p3, const Point_2 &p4)
 returns true iff \( \|p1-p2\| < \|p3-p4\|\).
 
const char * output_identifier ()
 returns a unique identifier for kernel object Input/Output. More...
 

Member Enumeration Documentation

a type descriptor for extended points.

Enumerator
SWCORNER 
LEFTFRAME 
NWCORNER 
BOTTOMFRAME 
STANDARD 
TOPFRAME 
SECORNER 
RIGHTFRAME 
NECORNER 

Member Function Documentation

Point_2 ExtendedKernelTraits_2::intersection ( const Segment_2 s1,
const Segment_2 s2 
)

returns the point of intersection of the lines supported by s1 and s2.

Precondition
The intersection point exists.
const char* ExtendedKernelTraits_2::output_identifier ( )

returns a unique identifier for kernel object Input/Output.

Usually this should be the name of the model.

Standard_line_2 ExtendedKernelTraits_2::standard_line ( const Point_2 p)

returns the oriented line representing the bundle of rays defining p.

Precondition
!K.is_standard(p).
Standard_point_2 ExtendedKernelTraits_2::standard_point ( const Point_2 p)

returns the standard point represented by p.

Precondition
K.is_standard(p).
Standard_ray_2 ExtendedKernelTraits_2::standard_ray ( const Point_2 p)

a ray defining p.

Precondition
!K.is_standard(p).