Advanced Strategic Command
mappolygons.h
Go to the documentation of this file.
1 
5 // $Id: mappolygons.h,v 1.4 2009-04-18 13:48:38 mbickel Exp $
6 
7 /*
8  This file is part of Advanced Strategic Command; http://www.asc-hq.de
9  Copyright (C) 1994-2010 Martin Bickel and Marc Schellenberger
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; see the file COPYING. If not, write to the
23  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
24  Boston, MA 02111-1307 USA
25 */
26 
27 #ifndef mappolygonsH
28  #define mappolygonsH
29 
30 
31 #include "polygontriangulation.h"
32 #include "typen.h"
33 #include "terraintype.h"
34 
35 class Poly_gon {
36  public:
38  typedef vector<Point>::iterator VertexIterator;
39  vector<Point> vertex;
40  void read ( tnstream& stream );
41  void write ( tnstream& stream ) const;
42 };
43 
44 
45 
46 class PolygonPainterSquareCoordinate : protected PolygonPainter<Poly_gon> {
47  protected:
48  virtual void setpoint ( int x, int y );
49  virtual void setpointabs ( int x, int y )=0;
50  public:
51  void setspecificpoint ( int x, int y ) { setpointabs ( x, y ); };
52  bool paintPolygon ( const Poly_gon& poly );
53  };
54 
55 
56 #endif //weather_h
vector< Point > vertex
Definition: mappolygons.h:39
void write(tnstream &stream) const
Definition: mappolygons.cpp:62
virtual void setpoint(int x, int y)
Definition: mappolygons.cpp:36
vector< Point >::iterator VertexIterator
Definition: mappolygons.h:38
The interface for all kinds of IO stream.
void setspecificpoint(int x, int y)
Definition: mappolygons.h:51
Interface to the polygon triangulation library.
Coordinate on the twodimensional map.
Definition: typen.h:202
bool paintPolygon(const Poly_gon &poly)
Definition: mappolygons.cpp:42
virtual void setpointabs(int x, int y)=0
MapCoordinate Point
Definition: mappolygons.h:37
void read(tnstream &stream)
Definition: mappolygons.cpp:53