CGAL 5.5.2 - 2D Boolean Operations on Nef Polygons Embedded on the Sphere
CGAL::Nef_polyhedron_S2< Traits >::Sphere_segment Class Reference

#include <CGAL/Nef_polyhedron_S2.h>

Definition

An object s of type Sphere_segment is a segment in the surface of a unit sphere that is part of a great circle trough the origin.

Sphere segments are represented by two sphere points \( p\) and \( q\) plus an oriented plane \( h\) that contains \( p\) and \( q\). The plane determines the sphere segment as follows. Let \( c\) be the circle in the intersection of \( h\) and \( S_2\). Then \( s\) is that part of \( c\) that is swept, when we rotate \( p\) into \( q\) in counterclockwise rotation around the normal vector of \( h\) as seen from the positive halfspace.

Creation

 Sphere_segment ()
 creates some sphere segment.
 
 Sphere_segment (const Sphere_point &p1, const Sphere_point &p2, bool shorter_arc=true)
 creates a spherical segment spanning the shorter arc from p1 to p2 if shorter_arc == true. More...
 
 Sphere_segment (const Sphere_point &p1, const Sphere_point &p2, const Sphere_circle &c)
 creates a spherical segment spanning the arc from p1 to p2 as part of the oriented circle c (p1 == p2 or p1 == p2.opposite() are possible.) More...
 
 Sphere_segment (const Sphere_circle &c1, const Sphere_circle &c2)
 creates the spherical segment as part of c1 that is part of the halfsphere left of the oriented circle c2. More...
 

Operations

const Sphere_pointsource ()
 the source point of s.
 
const Sphere_pointtarget ()
 the target point of s.
 
const Sphere_circlesphere_circle ()
 the great circle supporting s.
 
Sphere_segment opposite ()
 returns the sperical segment oriented from target() to source() with the same point set as s.
 
Sphere_segment complement ()
 returns the sperical segment oriented from target() to source() with the point set completing s to a full circle.
 
bool is_short ()
 a segment is short iff it is shorter than a half-circle.
 
bool is_long ()
 a segment is long iff it is longer than a half-circle.
 
bool is_degenerate ()
 return true iff s is degenerate, i.e. source and target are the same.
 
bool is_halfcircle ()
 return true iff s is a perfect half-circle, i.e. source().antipode == target().
 
bool has_on (const Sphere_point &p)
 return true iff s contains p.
 
bool has_in_relative_interior (const Sphere_point &p)
 return true iff s contains p in its relative interior.
 

Constructor & Destructor Documentation

◆ Sphere_segment() [1/3]

template<typename Traits >
CGAL::Nef_polyhedron_S2< Traits >::Sphere_segment::Sphere_segment ( const Sphere_point p1,
const Sphere_point p2,
bool  shorter_arc = true 
)

creates a spherical segment spanning the shorter arc from p1 to p2 if shorter_arc == true.

Otherwise the longer arc is created.

Precondition
p1 != p2 and p1 != p2.opposite().

◆ Sphere_segment() [2/3]

template<typename Traits >
CGAL::Nef_polyhedron_S2< Traits >::Sphere_segment::Sphere_segment ( const Sphere_point p1,
const Sphere_point p2,
const Sphere_circle c 
)

creates a spherical segment spanning the arc from p1 to p2 as part of the oriented circle c (p1 == p2 or p1 == p2.opposite() are possible.)

Precondition
p1 and p2 are contained in c.

◆ Sphere_segment() [3/3]

template<typename Traits >
CGAL::Nef_polyhedron_S2< Traits >::Sphere_segment::Sphere_segment ( const Sphere_circle c1,
const Sphere_circle c2 
)

creates the spherical segment as part of c1 that is part of the halfsphere left of the oriented circle c2.

Precondition
c1 != c2 as unoriented circles.