source: Sophya/trunk/SophyaPI/PIGcont/pigncont.h@ 4007

Last change on this file since 4007 was 3342, checked in by ansari, 18 years ago

Methodes GetOptionsHelpInfo() et OptionToString() code pour le traceur de contour PIContourDrawer , Reza 08/10/2007

File size: 3.4 KB
RevLine 
[1829]1// This may look like C code, but it is really -*- C++ -*-
2// Classe GNUPlotContour : interface avec le code de gnuplot pour tracer les contours
[1919]3// Classe PIContourDrawer : trace des contours dans PI
[1829]4// (c) DAPNIA (CEA) LAL (IN2P3/CNRS)
5// R. Ansari O.Perdereau 11/2001
6//=========================================================//
7
8#ifndef PIGNCONT_H_SEEN
9#define PIGNCONT_H_SEEN
10#include "pistdimgapp.h"
11#include "piscdrawwdg.h"
12
13#include "ntuple.h"
14extern "C" {
[1844]15#include "gp_contour.h"
[1838]16#include "gp_alloc.h"
[1857]17 //#include "gpc_set.h"
[1829]18}
19
20class GNUPlotContour{
21public:
22 GNUPlotContour(P2DArrayAdapter*,int *nz,double *z0,double *dz);
23 GNUPlotContour(NTupleInterface *nt,int *nz,double *z0,double *dz);
24 GNUPlotContour(struct iso_curve *);
25 ~GNUPlotContour();
26 void CalcContour();
27 double Level(int i){return My_Levels[i];};
28 const double *Levels(){return My_Levels;};
29 void SetMyLevels(double *ptr,int k);
[2250]30 void SetMyLevels(vector <double> vec);
[1829]31 int NLevels(){return Contour_Levels;};
32 void SetNLevel(int n){Contour_Levels=n;};
33 int NContours(){return _npolys;};
34 void SetCntLevelKind(t_contour_levels_kind kind){Contour_Levels_kind = kind;};
[3342]35 t_contour_levels_kind GetCntLevelKind() const {return Contour_Levels_kind ;};
[1829]36 void SetCntKind(t_contour_kind kind){Contour_kind = kind;};
[3342]37 t_contour_kind GetCntKind() const {return Contour_kind ;};
[1829]38
[2250]39
[1829]40 NTuple * & MyIso(){return _myiso;};
41
42 double Xmin(){return _xmin;};
43 double Xmax(){return _xmax;};
44 double Ymin(){return _ymin;};
45 double Ymax(){return _ymax;};
46 double Zmin(){return _zmin;};
47 double Zmax(){return _zmax;};
48
49private:
50
51protected:
52 NTuple * _myiso;
53 int _nx,_ny;
54 struct iso_curve *iso1 ;
55 bool _Invx,_Invy,_Exy;
56 double _Dxp, _Dyp;
57 struct gnuplot_contours *_contours;
58 int Contour_Levels;
59
60 double *My_Levels;
61
62 double _xmin,_xmax,_ymin,_ymax,_zmin,_zmax;
63 int _npolys;
64 t_contour_levels_kind Contour_Levels_kind;
65 t_contour_kind Contour_kind;
66
67
68};
69
70class PIContourDrawer : public PIDrawer, public GNUPlotContour{
71public:
72 PIContourDrawer(P2DArrayAdapter* arr,bool autodel ,int *nz=NULL,double *z0=NULL,double *dz=NULL);
73 PIContourDrawer(NTupleInterface* nti,bool autodel ,int *nz=NULL,double *z0=NULL,double *dz=NULL);
74 virtual ~PIContourDrawer();
75 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
76 virtual void UpdateLimits();
[3342]77 virtual bool IsLineOn() const;
78 virtual bool IsMarkOn() const;
79 virtual bool IsLabelOn() const;
[2250]80 virtual void SetLineOn(bool b=true);
81 virtual void SetMarkOn(bool b=true);
82 virtual void SetLabelOn(bool b=true);
[1829]83
84 //Init attributs graphiques
85
86 void InitAtts();
87
88
89// Methode permettant l'affichage d'une fenetre de controle specialisee
90 virtual void ShowControlWindow(PIBaseWdgGen* wdg);
[2250]91 // Desactivation de la fenetre de controle specialisee
92 virtual void DeactivateControlWindow(PIBaseWdgGen* wdg);
93// Methode permettant de decoder des options a partir de chaines
[3342]94 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
95 virtual int OptionToString(vector<string> & opt) const;
96// Texte d'aide des options disponibles
97 virtual void GetOptionsHelpInfo(string& info);
[1829]98
99
100protected:
101 bool _autodel;
102 int _nz;
103 P2DArrayAdapter* _arr;
104 NTupleInterface* _nti;
105 bool mLineOn,mMarkOn,mLabelOn;
106
107
108
109
110};
111
112
113//
114
115#endif
Note: See TracBrowser for help on using the repository browser.