visu_eps.h

Go to the documentation of this file.
00001 #ifndef __visu_eps_h
00002 #define __visu_eps_h
00003 
00004 #include "patchmesh.h"
00005 #include "string"
00006 #include <map>
00007 #include  "gascoigne.h"
00008 
00009 /*-------------------------------------------------------------------------*/
00010 
00011 namespace Gascoigne
00012 {
00013 class VisuEPS
00014 {
00015   protected:  
00016 
00017   typedef std::pair<int,int> Line;
00018   typedef nvector<IntSet> Lines;
00019 
00020   const PatchMesh* M;
00021 
00022   Lines lines;
00023   int   n_lines;
00024   Vertex2d offset;
00025   
00026   // EPS optionen
00027   std::map<int,int>    INTOPT;
00028   std::map<int,double> DOUBLEOPT;
00029 
00030   // sort line p (left,bottom) first
00031   void Lexiko(Line& p) const;
00032 
00033   // test if vertices a,b,c are aligned straightly
00034   bool InLine(int a,int b,int c) const;
00035   
00036   void CombineLines();
00037     
00038   public:
00039 
00040   VisuEPS();
00041 
00059   enum EPSOptions { WRITE_PATCH, LINEWIDTH, WIDTH, COMBINE_LINES };
00060   
00061   void SetOption(EPSOptions o, int v);
00062   void SetOption(EPSOptions o, double v);
00063   
00064   void SetMesh(const MeshInterface& PM)  { 
00065     const PatchMesh* PMP = dynamic_cast<const PatchMesh*>(&PM);
00066     assert(PMP);
00067     M = PMP;}
00068   void WriteGrid(std::string fname, int iter);
00069 };
00070 }
00071 
00072 #endif

Generated on Thu Sep 14 10:34:36 2006 for Gascoigne by  doxygen 1.4.7