Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

AbstractPreparedPolygonContains.h

00001 /**********************************************************************
00002  * $Id: AbstractPreparedPolygonContains.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_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00018 #define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00019 
00020 #include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
00021 
00022 
00023 // forward declarations
00024 namespace geos {
00025         namespace geom { 
00026                 class Geometry;
00027 
00028                 namespace prep { 
00029                         class PreparedPolygon;
00030                 }
00031         }
00032 }
00033 
00034 
00035 namespace geos {
00036 namespace geom { // geos::geom
00037 namespace prep { // geos::geom::prep
00038 
00061 class AbstractPreparedPolygonContains : public PreparedPolygonPredicate 
00062 {
00063 private:
00064         // information about geometric situation
00065         bool hasSegmentIntersection;
00066         bool hasProperIntersection;
00067         bool hasNonProperIntersection;
00068 
00069         bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom);
00070 
00076         bool isSingleShell( const geom::Geometry & geom);
00077         
00078         void findAndClassifyIntersections( const geom::Geometry * geom);
00079 
00080 protected:
00087         bool requireSomePointInInterior;
00088 
00096         bool eval( const geom::Geometry * geom);
00097 
00105         virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0;
00106 
00107 public:
00108         AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly) 
00109         :       PreparedPolygonPredicate( prepPoly),
00110                 hasSegmentIntersection( false),
00111                 hasProperIntersection( false),
00112                 hasNonProperIntersection( false),
00113                 requireSomePointInInterior(true)
00114         { }
00115 
00116         AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly, bool requireSomePointInInterior) 
00117         :       PreparedPolygonPredicate( prepPoly),
00118                 hasSegmentIntersection( false),
00119                 hasProperIntersection( false),
00120                 hasNonProperIntersection( false),
00121                 requireSomePointInInterior(requireSomePointInInterior)
00122         { }
00123 
00124         virtual ~AbstractPreparedPolygonContains()
00125         { }
00126 
00127 };
00128 
00129 } // geos::geom::prep
00130 } // geos::geom
00131 } // geos
00132 
00133 #endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
00134 /**********************************************************************
00135  * $Log$
00136  **********************************************************************/
00137 

Generated on Tue Jan 6 06:17:20 2009 for GEOS by  doxygen 1.4.4