GEOS
3.3.2
|
00001 /********************************************************************** 00002 * $Id: PreparedPolygonContains.h 2418 2009-04-29 08:15:21Z 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/PreparedPolygonContains.java rev 1.5 (JTS-1.10) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H 00022 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H 00023 00024 #include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited 00025 00026 // forward declarations 00027 namespace geos { 00028 namespace geom { 00029 class Geometry; 00030 00031 namespace prep { 00032 class PreparedPolygon; 00033 } 00034 } 00035 } 00036 00037 namespace geos { 00038 namespace geom { // geos::geom 00039 namespace prep { // geos::geom::prep 00040 00055 class PreparedPolygonContains : public AbstractPreparedPolygonContains 00056 { 00057 public: 00058 00064 PreparedPolygonContains(const PreparedPolygon * const prepPoly); 00065 00072 bool contains(const geom::Geometry * geom) 00073 { 00074 return eval(geom); 00075 } 00076 00085 static bool contains(const PreparedPolygon * const prep, const geom::Geometry * geom) 00086 { 00087 PreparedPolygonContains polyInt(prep); 00088 return polyInt.contains(geom); 00089 } 00090 00091 protected: 00099 bool fullTopologicalPredicate(const geom::Geometry * geom); 00100 00101 }; 00102 00103 } // geos::geom::prep 00104 } // geos::geom 00105 } // geos 00106 00107 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H 00108 /********************************************************************** 00109 * $Log$ 00110 **********************************************************************/ 00111