GEOS  3.13.0dev
SweepLineSegment.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #pragma once
17 
18 #include <cstddef>
19 #include <geos/export.h>
20 #include <geos/geomgraph/index/SweepLineEventObj.h> // for inheritance
21 
22 // Forward declarations
23 namespace geos {
24 namespace geom {
25 class CoordinateSequence;
26 }
27 namespace geomgraph {
28 class Edge;
29 namespace index {
30 class SegmentIntersector;
31 }
32 }
33 }
34 
35 namespace geos {
36 namespace geomgraph { // geos::geomgraph
37 namespace index { // geos::geomgraph::index
38 
39 class GEOS_DLL SweepLineSegment: public SweepLineEventOBJ {
40 public:
41  SweepLineSegment(Edge* newEdge, std::size_t newPtIndex);
42  ~SweepLineSegment() override = default;
43  double getMinX();
44  double getMaxX();
45  void computeIntersections(SweepLineSegment* ss, SegmentIntersector* si);
46 protected:
47  Edge* edge;
48  const geom::CoordinateSequence* pts;
49  std::size_t ptIndex;
50 };
51 
52 
53 
54 } // namespace geos.geomgraph.index
55 } // namespace geos.geomgraph
56 } // namespace geos
57 
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25