00001 /********************************************************************** 00002 * $Id: PreparedPolygonPredicate.h 2420 2009-04-29 08:56:14Z strk $ 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 * Last port: geom/prep/PreparedPolygonPredicate.java rev. 1.4 (JTS-1.10) 00018 * (2007-12-12) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00023 #define GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00024 00025 #include <geos/geom/Coordinate.h> 00026 00027 // forward declarations 00028 namespace geos { 00029 namespace algorithm { 00030 namespace locate { 00031 class PointOnGeometryLocator; 00032 } 00033 } 00034 namespace geom { 00035 class Geometry; 00036 00037 namespace prep { 00038 class PreparedPolygon; 00039 } 00040 } 00041 namespace noding { 00042 class FastSegmentSetIntersectionFinder; 00043 } 00044 } 00045 00046 00047 namespace geos { 00048 namespace geom { // geos::geom 00049 namespace prep { // geos::geom::prep 00050 00058 class PreparedPolygonPredicate 00059 { 00060 private: 00061 protected: 00062 const PreparedPolygon * const prepPoly; 00063 00074 bool isAllTestComponentsInTarget(const geom::Geometry * testGeom) const; 00075 00086 bool isAllTestComponentsInTargetInterior( const geom::Geometry * testGeom) const; 00087 00098 bool isAnyTestComponentInTarget( const geom::Geometry * testGeom) const; 00099 00110 bool isAnyTestComponentInTargetInterior( const geom::Geometry * testGeom) const; 00111 00120 bool isAnyTargetComponentInAreaTest( const geom::Geometry * testGeom, const geom::Coordinate::ConstVect * targetRepPts) const; 00121 00122 public: 00128 PreparedPolygonPredicate( const PreparedPolygon * const prepPoly) 00129 : prepPoly( prepPoly) 00130 { } 00131 00132 virtual ~PreparedPolygonPredicate() 00133 { } 00134 00135 }; 00136 00137 } // namespace geos::geom::prep 00138 } // namespace geos::geom 00139 } // namespace geos 00140 00141 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00142 /********************************************************************** 00143 * $Log$ 00144 **********************************************************************/ 00145
1.4.4