1 // P2DVIEW_WCL.H : write a short description here...
2 
3 // Copyright (C) 2005 Tommi Hassinen.
4 
5 // This package is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 
10 // This package is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this package; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 /*################################################################################################*/
20 
21 #include "ghemicalconfig2.h"
22 
23 #ifndef P2DVIEW_WCL_H
24 #define P2DVIEW_WCL_H
25 
26 #include "ac_stor_wcl.h"
27 
28 #include <ghemical/engine.h>
29 
30 /*################################################################################################*/
31 
32 struct p2d_data
33 {
34 	double c1;		// coordinate 1 (say, x-coordinate)
35 	double c2;		// coordinate 2 (say, y-coordinate)
36 	double v;		// value
37 
38 	int ac_i;		// atom coordinate data
39 };
40 
41 class p2dview_wcl :
42 	public ac_stor_wcl
43 {
44 	protected:
45 
46 	char * name1;
47 	char * name2;
48 	char * namev;
49 
50 	vector<p2d_data> dv;
51 
52 	f64 min1; f64 max1;
53 	f64 min2; f64 max2;
54 	f64 minv; f64 maxv;
55 
56 	public:
57 
58 	p2dview_wcl(const char *, const char *, const char *);
59 	virtual ~p2dview_wcl(void);
60 
61 	void AddData(double, double, double);
62 	void AddDataWithAC(double, double, double, engine *);
63 	virtual void Finalize(void);
64 
65 	void ButtonEvent(int, int);		// virtual
66 	void MotionEvent(int, int);		// virtual
67 
68 	void UpdateWnd(void);			// virtual
69 
70 	void InitGL(void);			// virtual
71 	void RenderGL(rmode);			// virtual
72 
73 	protected:
74 
75 	void SetColor(GLfloat);
76 };
77 
78 /*################################################################################################*/
79 
80 #endif	// P2DVIEW_WCL_H
81 
82 // eof
83