PreparedPolygon.h

00001 /**********************************************************************
00002  *
00003  * GEOS - Geometry Engine Open Source
00004  * http://geos.osgeo.org
00005  *
00006  * Copyright (C) 2006 Refractions Research Inc.
00007  *
00008  * This is free software; you can redistribute and/or modify it under
00009  * the terms of the GNU Lesser General Public Licence as published
00010  * by the Free Software Foundation. 
00011  * See the COPYING file for more information.
00012  *
00013  *
00014  **********************************************************************
00015  *
00016  * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
00017  *
00018  **********************************************************************/
00019 
00020 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
00021 #define GEOS_GEOM_PREP_PREPAREDPOLYGON_H
00022 
00023 #include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
00024 #include <geos/noding/SegmentString.h> 
00025 
00026 namespace geos {
00027         namespace noding {
00028                 class FastSegmentSetIntersectionFinder;
00029         }
00030         namespace algorithm {
00031                 namespace locate {
00032                         class PointOnGeometryLocator;
00033                 }
00034         }
00035 }
00036 
00037 namespace geos {
00038 namespace geom { // geos::geom
00039 namespace prep { // geos::geom::prep
00040 
00048 class PreparedPolygon : public BasicPreparedGeometry 
00049 {
00050 private:
00051         bool isRectangle;
00052         mutable noding::FastSegmentSetIntersectionFinder * segIntFinder;
00053         mutable algorithm::locate::PointOnGeometryLocator * ptOnGeomLoc;
00054         mutable noding::SegmentString::ConstVect segStrings;
00055 
00056 protected:
00057 public:
00058         PreparedPolygon( const geom::Geometry * geom);
00059         ~PreparedPolygon( );
00060   
00061         noding::FastSegmentSetIntersectionFinder * getIntersectionFinder() const;
00062         algorithm::locate::PointOnGeometryLocator * getPointLocator() const;
00063         
00064         bool contains( const geom::Geometry* g) const;
00065         bool containsProperly( const geom::Geometry* g) const;
00066         bool covers( const geom::Geometry* g) const;
00067         bool intersects( const geom::Geometry* g) const;
00068 
00069 };
00070 
00071 } // namespace geos::geom::prep
00072 } // namespace geos::geom
00073 } // namespace geos
00074 
00075 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H

Generated on 15 May 2014 for GEOS by  doxygen 1.4.7