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/PreparedPolygonPredicate.java rev. 1.4 (JTS-1.10) 00017 * (2007-12-12) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00022 #define GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00023 00024 #include <geos/geom/Coordinate.h> 00025 00026 // forward declarations 00027 namespace geos { 00028 namespace algorithm { 00029 namespace locate { 00030 class PointOnGeometryLocator; 00031 } 00032 } 00033 namespace geom { 00034 class Geometry; 00035 00036 namespace prep { 00037 class PreparedPolygon; 00038 } 00039 } 00040 namespace noding { 00041 class FastSegmentSetIntersectionFinder; 00042 } 00043 } 00044 00045 00046 namespace geos { 00047 namespace geom { // geos::geom 00048 namespace prep { // geos::geom::prep 00049 00057 class PreparedPolygonPredicate 00058 { 00059 private: 00060 // Declare type as noncopyable 00061 PreparedPolygonPredicate(const PreparedPolygonPredicate& other); 00062 PreparedPolygonPredicate& operator=(const PreparedPolygonPredicate& rhs); 00063 00064 protected: 00065 const PreparedPolygon * const prepPoly; 00066 00077 bool isAllTestComponentsInTarget(const geom::Geometry * testGeom) const; 00078 00089 bool isAllTestComponentsInTargetInterior( const geom::Geometry * testGeom) const; 00090 00101 bool isAnyTestComponentInTarget( const geom::Geometry * testGeom) const; 00102 00113 bool isAnyTestComponentInTargetInterior( const geom::Geometry * testGeom) const; 00114 00123 bool isAnyTargetComponentInAreaTest( const geom::Geometry * testGeom, const geom::Coordinate::ConstVect * targetRepPts) const; 00124 00125 public: 00131 PreparedPolygonPredicate( const PreparedPolygon * const prepPoly) 00132 : prepPoly( prepPoly) 00133 { } 00134 00135 virtual ~PreparedPolygonPredicate() 00136 { } 00137 00138 }; 00139 00140 } // namespace geos::geom::prep 00141 } // namespace geos::geom 00142 } // namespace geos 00143 00144 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H 00145