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