00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_GEOMGRAPH_QUADRANT_H
00022 #define GEOS_GEOMGRAPH_QUADRANT_H
00023
00024 #include <geos/export.h>
00025 #include <string>
00026
00027 #include <geos/inline.h>
00028
00029
00030 namespace geos {
00031 namespace geom {
00032 class Coordinate;
00033 }
00034 }
00035
00036 namespace geos {
00037 namespace geomgraph {
00038
00048 class GEOS_DLL Quadrant {
00049
00050 public:
00051
00052 static const int NE = 0;
00053 static const int NW = 1;
00054 static const int SW = 2;
00055 static const int SE = 3;
00056
00063 static int quadrant(double dx, double dy);
00064
00070 static int quadrant(const geom::Coordinate& p0,
00071 const geom::Coordinate& p1);
00072
00076 static bool isOpposite(int quad1, int quad2);
00077
00078
00079
00080
00081
00082
00083
00084 static int commonHalfPlane(int quad1, int quad2);
00085
00090 static bool isInHalfPlane(int quad, int halfPlane);
00091
00095 static bool isNorthern(int quad);
00096 };
00097
00098
00099 }
00100 }
00101
00102 #endif // ifndef GEOS_GEOMGRAPH_QUADRANT_H
00103