00001 00005 // $Id: mappolygons.h,v 1.3 2007-04-13 16:15:53 mbickel Exp $ 00006 00007 /* 00008 This file is part of Advanced Strategic Command; http://www.asc-hq.de 00009 Copyright (C) 1994-1999 Martin Bickel and Marc Schellenberger 00010 00011 This program is free software; you can redistribute it and/or modify 00012 it under the terms of the GNU General Public License as published by 00013 the Free Software Foundation; either version 2 of the License, or 00014 (at your option) any later version. 00015 00016 This program is distributed in the hope that it will be useful, 00017 but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 GNU General Public License for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with this program; see the file COPYING. If not, write to the 00023 Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00024 Boston, MA 02111-1307 USA 00025 */ 00026 00027 #ifndef mappolygonsH 00028 #define mappolygonsH 00029 00030 00031 #include "polygontriangulation.h" 00032 #include "typen.h" 00033 #include "terraintype.h" 00034 00035 class Poly_gon { 00036 public: 00037 typedef MapCoordinate Point; 00038 typedef vector<Point>::iterator VertexIterator; 00039 vector<Point> vertex; 00040 void read ( tnstream& stream ); 00041 void write ( tnstream& stream ) const; 00042 }; 00043 00044 00045 00046 class PolygonPainterSquareCoordinate : protected PolygonPainter<Poly_gon> { 00047 protected: 00048 virtual void setpoint ( int x, int y ); 00049 virtual void setpointabs ( int x, int y )=0; 00050 public: 00051 void setspecificpoint ( int x, int y ) { setpointabs ( x, y ); }; 00052 bool paintPolygon ( const Poly_gon& poly ); 00053 }; 00054 00055 00056 #endif //weather_h
1.4.2