GEOS
3.4.2
|
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/PreparedPolygonContains.java rev 1.5 (JTS-1.10) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H 00021 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H 00022 00023 #include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited 00024 00025 // forward declarations 00026 namespace geos { 00027 namespace geom { 00028 class Geometry; 00029 00030 namespace prep { 00031 class PreparedPolygon; 00032 } 00033 } 00034 } 00035 00036 namespace geos { 00037 namespace geom { // geos::geom 00038 namespace prep { // geos::geom::prep 00039 00054 class PreparedPolygonContains : public AbstractPreparedPolygonContains 00055 { 00056 public: 00057 00063 PreparedPolygonContains(const PreparedPolygon * const prepPoly); 00064 00071 bool contains(const geom::Geometry * geom) 00072 { 00073 return eval(geom); 00074 } 00075 00084 static bool contains(const PreparedPolygon * const prep, const geom::Geometry * geom) 00085 { 00086 PreparedPolygonContains polyInt(prep); 00087 return polyInt.contains(geom); 00088 } 00089 00090 protected: 00098 bool fullTopologicalPredicate(const geom::Geometry * geom); 00099 00100 }; 00101 00102 } // geos::geom::prep 00103 } // geos::geom 00104 } // geos 00105 00106 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H