geos::geomgraph::Quadrant Class Reference

#include <Quadrant.h>

List of all members.

Static Public Member Functions

static int quadrant (double dx, double dy)
static int quadrant (const geom::Coordinate &p0, const geom::Coordinate &p1)
static bool isOpposite (int quad1, int quad2)
static int commonHalfPlane (int quad1, int quad2)
static bool isInHalfPlane (int quad, int halfPlane)
static bool isNorthern (int quad)


Detailed Description

Utility functions for working with quadrants, which are numbered as follows:
 1 | 0
 --+--
 2 | 3
 

Member Function Documentation

static int geos::geomgraph::Quadrant::quadrant ( double  dx,
double  dy 
) [static]

Returns the quadrant of a directed line segment (specified as x and y displacements, which cannot both be 0).

static int geos::geomgraph::Quadrant::quadrant ( const geom::Coordinate p0,
const geom::Coordinate p1 
) [static]

Returns the quadrant of a directed line segment from p0 to p1.

static bool geos::geomgraph::Quadrant::isOpposite ( int  quad1,
int  quad2 
) [static]

Returns true if the quadrants are 1 and 3, or 2 and 4

static bool geos::geomgraph::Quadrant::isInHalfPlane ( int  quad,
int  halfPlane 
) [static]

Returns whether the given quadrant lies within the given halfplane (specified by its right-hand quadrant).

static bool geos::geomgraph::Quadrant::isNorthern ( int  quad  )  [static]

Returns true if the given quadrant is 0 or 1.


The documentation for this class was generated from the following file:
Generated on Fri Mar 27 04:53:34 2009 for GEOS by  doxygen 1.5.4