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

Last change on this file since 1919 was 1919, checked in by perderos, 24 years ago

correction de bugs dans setting des niveaux + changement du defaut du trace
OP 06-03-2002

File size: 2.9 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);
30 int NLevels(){return Contour_Levels;};
31 void SetNLevel(int n){Contour_Levels=n;};
32 int NContours(){return _npolys;};
33 void SetCntLevelKind(t_contour_levels_kind kind){Contour_Levels_kind = kind;};
34 t_contour_levels_kind GetCntLevelKind(){return Contour_Levels_kind ;};
35 void SetCntKind(t_contour_kind kind){Contour_kind = kind;};
36 t_contour_kind GetCntKind(){return Contour_kind ;};
37
38 NTuple * & MyIso(){return _myiso;};
39
40 double Xmin(){return _xmin;};
41 double Xmax(){return _xmax;};
42 double Ymin(){return _ymin;};
43 double Ymax(){return _ymax;};
44 double Zmin(){return _zmin;};
45 double Zmax(){return _zmax;};
46
47private:
48
49protected:
50 NTuple * _myiso;
51 int _nx,_ny;
52 struct iso_curve *iso1 ;
53 bool _Invx,_Invy,_Exy;
54 double _Dxp, _Dyp;
55 struct gnuplot_contours *_contours;
56 int Contour_Levels;
57
58 double *My_Levels;
59
60 double _xmin,_xmax,_ymin,_ymax,_zmin,_zmax;
61 int _npolys;
62 t_contour_levels_kind Contour_Levels_kind;
63 t_contour_kind Contour_kind;
64
65
66};
67
68class PIContourDrawer : public PIDrawer, public GNUPlotContour{
69public:
70 PIContourDrawer(P2DArrayAdapter* arr,bool autodel ,int *nz=NULL,double *z0=NULL,double *dz=NULL);
71 PIContourDrawer(NTupleInterface* nti,bool autodel ,int *nz=NULL,double *z0=NULL,double *dz=NULL);
72 virtual ~PIContourDrawer();
73 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
74 virtual void UpdateLimits();
75 virtual bool IsLineOn();
76 virtual bool IsMarkOn();
77 virtual bool IsLabelOn();
78 virtual void SetLineOn(bool );
79 virtual void SetMarkOn(bool);
80 virtual void SetLabelOn(bool);
81
82 //Init attributs graphiques
83
84 void InitAtts();
85
86
87// Methode permettant l'affichage d'une fenetre de controle specialisee
88 virtual void ShowControlWindow(PIBaseWdgGen* wdg);
89
90
91protected:
92 bool _autodel;
93 int _nz;
94 P2DArrayAdapter* _arr;
95 NTupleInterface* _nti;
96 bool mLineOn,mMarkOn,mLabelOn;
97
98
99
100
101};
102
103
104//
105
106#endif
Note: See TracBrowser for help on using the repository browser.