CGAL 5.1.4 - 2D Segment Delaunay Graphs
SegmentDelaunayGraphSite_2 Concept Reference

Definition

Types

typedef unspecified_type Point_2
 The point type.
 
typedef unspecified_type Segment_2
 The segment type.
 
typedef unspecified_type FT
 The field number type.
 
typedef unspecified_type RT
 The ring number type.
 

Creation

In addition to the default and copy constructors the following static methods are available for constructing sites:

static SegmentDelaunayGraphSite_2 construct_site_2 (Point_2 p)
 Constructs a site from a point: the site represents the point p.
 
static SegmentDelaunayGraphSite_2 construct_site_2 (Point_2 p1, Point_2 p2)
 Constructs a site from two points: the site represents the (open) segment (p1,p2).
 
static SegmentDelaunayGraphSite_2 construct_site_2 (Point_2 p1, Point_2 p2, Point_2 q1, Point_2 q2)
 Constructs a site from four points: the site represents the point of intersection of the segments (p1,p2) and (q1,q2).
 
static SegmentDelaunayGraphSite_2 construct_site_2 (Point_2 p1, Point_2 p2, Point_2 q1, Point_2 q2, bool b)
 Constructs a site from four points and a Boolean: the site represents a segment. More...
 
static SegmentDelaunayGraphSite_2 construct_site_2 (Point_2 p1, Point_2 p2, Point_2 q1, Point_2 q2, Point_2 r1, Point_2 r2)
 Constructs a site from six points: the site represents the segment with endpoints the points of intersection of the pairs of segments (p1,p2),(q1,q2) and (p1,p2),(r1,r2).
 

Predicates

bool is_defined ()
 Returns true if the site represents a valid point or segment.
 
bool is_point ()
 Returns true if the site represents a point.
 
bool is_segment ()
 Returns true if the site represents a segment.
 
bool is_input ()
 Returns true if the site represents an input point or a segment defined by two input points. More...
 
bool is_input (unsigned int i)
 Returns true if the i-th endpoint of the site is an input point. More...
 

Access Functions

Point_2 point () const
 Returns the point represented by the site s. More...
 
Segment_2 segment () const
 Returns the segment represented by the site s. More...
 
Point_2 source () const
 Returns the source endpoint of the segment. More...
 
Point_2 target () const
 Returns the target endpoint of the segment. More...
 
SegmentDelaunayGraphSite_2 supporting_site ()
 Returns a segment site object representing the segment that supports the segment represented by the site. More...
 
SegmentDelaunayGraphSite_2 supporting_site (unsigned int i)
 Returns a segment site object representing the i-th segment that supports the point of intersection represented by the site. More...
 
SegmentDelaunayGraphSite_2 crossing_site (unsigned int i)
 Returns a segment site object representing the i-th segment that supports the \( i\)-th endpoint of the site which is not the supporting segment of the site. More...
 
SegmentDelaunayGraphSite_2 source_site ()
 Returns a point site object representing the source point of the site. More...
 
SegmentDelaunayGraphSite_2 target_site ()
 Returns a point site object representing the target point of the site. More...
 
Point_2 source_of_supporting_site ()
 Returns the source point of the supporting site of the this site. More...
 
Point_2 target_of_supporting_site ()
 Returns the target point of the supporting site of the this site. More...
 
Point_2 source_of_supporting_site (unsigned int i)
 Returns the source point of the i-th supporting site of the this site. More...
 
Point_2 target_of_supporting_site (unsigned int i)
 Returns the target point of the i-th supporting site of the this site. More...
 
Point_2 source_of_crossing_site (unsigned int i)
 Returns the source point of the i-th crossing site of the this site. More...
 
Point_2 target_of_crossing_site (unsigned int i)
 Returns the target point of the i-th supporting site of the this site. More...
 

Member Function Documentation

◆ construct_site_2()

static SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::construct_site_2 ( Point_2  p1,
Point_2  p2,
Point_2  q1,
Point_2  q2,
bool  b 
)
static

Constructs a site from four points and a Boolean: the site represents a segment.

If b is true the endpoints are p1 and \( p_\times\), otherwise \( p_\times\) and p2. \( p_\times\) is the point of intersection of the segments (p1,p2),(q1,q2).

◆ crossing_site()

SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::crossing_site ( unsigned int  i)

Returns a segment site object representing the i-th segment that supports the \( i\)-th endpoint of the site which is not the supporting segment of the site.

Both endpoints of the returned site are input points.

Precondition
i must be at most \( 1\), s.is_segment() must be true and s.is_input(i) must be false.

◆ is_input() [1/2]

bool SegmentDelaunayGraphSite_2::is_input ( )

Returns true if the site represents an input point or a segment defined by two input points.

Returns false if it represents a point of intersection of two segments, or if it represents a segment, at least one endpoint of which is a point of intersection of two segments.

◆ is_input() [2/2]

bool SegmentDelaunayGraphSite_2::is_input ( unsigned int  i)

Returns true if the i-th endpoint of the site is an input point.

Returns false if the i-th endpoint of the site is the intersection of two segments.

Precondition
i must be at most \( 1\), and s.is_segment() must be true.

◆ point()

Point_2 SegmentDelaunayGraphSite_2::point ( ) const

Returns the point represented by the site s.

Precondition
s.is_point() must be true.

◆ segment()

Segment_2 SegmentDelaunayGraphSite_2::segment ( ) const

Returns the segment represented by the site s.

Precondition
s.is_segment() must be true.

◆ source()

Point_2 SegmentDelaunayGraphSite_2::source ( ) const

Returns the source endpoint of the segment.

Note that this method can construct an inexact point if the number type used is inexact.

Precondition
s.is_segment() must be true.

◆ source_of_crossing_site()

Point_2 SegmentDelaunayGraphSite_2::source_of_crossing_site ( unsigned int  i)

Returns the source point of the i-th crossing site of the this site.

Precondition
is_segment() must be true, is_input(i) must be false and i must either be 0 or 1.

◆ source_of_supporting_site() [1/2]

Point_2 SegmentDelaunayGraphSite_2::source_of_supporting_site ( )

Returns the source point of the supporting site of the this site.

Precondition
is_segment() must be true.

◆ source_of_supporting_site() [2/2]

Point_2 SegmentDelaunayGraphSite_2::source_of_supporting_site ( unsigned int  i)

Returns the source point of the i-th supporting site of the this site.

Precondition
is_point() must be true, is_input() must be false and i must either be 0 or 1.

◆ source_site()

SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::source_site ( )

Returns a point site object representing the source point of the site.

Precondition
s.is_segment() must be true.

◆ supporting_site() [1/2]

SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::supporting_site ( )

Returns a segment site object representing the segment that supports the segment represented by the site.

Both endpoints of the returned site are input points.

Precondition
s.is_segment() must be true.

◆ supporting_site() [2/2]

SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::supporting_site ( unsigned int  i)

Returns a segment site object representing the i-th segment that supports the point of intersection represented by the site.

Both endpoints of the returned site are input points.

Precondition
i must be at most \( 1\), s.is_point() must be true and s.is_input() must be false.

◆ target()

Point_2 SegmentDelaunayGraphSite_2::target ( ) const

Returns the target endpoint of the segment.

Note that this method can construct an inexact point if the number type used is inexact.

Precondition
s.is_segment() must be true.

◆ target_of_crossing_site()

Point_2 SegmentDelaunayGraphSite_2::target_of_crossing_site ( unsigned int  i)

Returns the target point of the i-th supporting site of the this site.

Precondition
is_segment() must be true, is_input(i) must be false and i must either be 0 or 1.

◆ target_of_supporting_site() [1/2]

Point_2 SegmentDelaunayGraphSite_2::target_of_supporting_site ( )

Returns the target point of the supporting site of the this site.

Precondition
is_segment() must be true.

◆ target_of_supporting_site() [2/2]

Point_2 SegmentDelaunayGraphSite_2::target_of_supporting_site ( unsigned int  i)

Returns the target point of the i-th supporting site of the this site.

Precondition
is_point() must be true, is_input() must be false and i must either be 0 or 1.

◆ target_site()

SegmentDelaunayGraphSite_2 SegmentDelaunayGraphSite_2::target_site ( )

Returns a point site object representing the target point of the site.

Precondition
s.is_segment() must be true.