15 #ifndef GEOS_OP_INTERSECTION_RECTANGLE_H 16 #define GEOS_OP_INTERSECTION_RECTANGLE_H 18 #include <geos/export.h> 22 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 28 class GeometryFactory;
37 namespace intersection {
65 Rectangle(
double x1,
double y1,
double x2,
double y2);
70 double xmin()
const {
return xMin; }
76 double ymin()
const {
return yMin; }
83 double xmax()
const {
return xMax; }
90 double ymax()
const {
return yMax; }
116 TopRight = Top|Right,
117 BottomLeft = Bottom|Left,
118 BottomRight = Bottom|Right
129 return (pos > Outside);
141 return onEdge(
Position(pos1 & pos2));
154 if(x>xMin && x<xMax && y>yMin && y<yMax)
157 if(x<xMin || x>xMax || y<yMin || y>yMax)
160 unsigned int pos = 0;
183 case Left:
return Top;
185 case Top:
return Right;
187 case Right:
return Bottom;
189 case Bottom:
return Left;
209 #endif // GEOS_OP_INTERSECTION_RECTANGLE_H static Position nextEdge(Position pos)
Next edge in clock-wise direction.
Definition: Rectangle.h:178
static bool onSameEdge(Position pos1, Position pos2)
Test if the given positions are on the same Rectangle edge.
Definition: Rectangle.h:139
static bool onEdge(Position pos)
Test if the given position is on a edge.
Definition: Rectangle.h:127
Represents a linear polygon, which may include holes.
Definition: Polygon.h:66
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Position
Position with respect to a clipping rectangle.
Definition: Rectangle.h:105
Models an OGC SFS LinearRing.
Definition: LinearRing.h:57
double xmax() const
Definition: Rectangle.h:83
double xmin() const
Definition: Rectangle.h:70
Position position(double x, double y) const
Establish position of coordinate with respect to a Rectangle.
Definition: Rectangle.h:151
double ymax() const
Definition: Rectangle.h:90
Clipping rectangle.
Definition: Rectangle.h:51
double ymin() const
Definition: Rectangle.h:76