source: pacpusframework/branches/2.0-beta1/include/extlib/qwtplot3d/qwt3d_drawable.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#ifndef __DRAWABLE_H__
2#define __DRAWABLE_H__
3
4
5#include <list>
6#include "qwt3d_global.h"
7#include "qwt3d_types.h"
8#include "qwt3d_io_gl2ps.h"
9
10namespace Qwt3D
11{
12
13//! ABC for Drawables
14class QWT3D_EXPORT Drawable
15{
16
17public:
18
19 virtual ~Drawable() = 0;
20
21 virtual void draw();
22
23 virtual void saveGLState();
24 virtual void restoreGLState();
25
26 void attach(Drawable*);
27 void detach(Drawable*);
28 void detachAll();
29
30 virtual void setColor(double r, double g, double b, double a = 1);
31 virtual void setColor(Qwt3D::RGBA rgba);
32 Qwt3D::Triple relativePosition(Qwt3D::Triple rel);
33
34protected:
35
36 Qwt3D::RGBA color;
37 void Enable(GLenum what, GLboolean val);
38 Qwt3D::Triple ViewPort2World(Qwt3D::Triple win, bool* err = 0);
39 Qwt3D::Triple World2ViewPort(Qwt3D::Triple obj, bool* err = 0);
40
41 GLdouble modelMatrix[16];
42 GLdouble projMatrix[16];
43 GLint viewport[4];
44
45
46private:
47
48 GLboolean ls;
49 GLboolean pols;
50 GLint polmode[2];
51 GLfloat lw;
52 GLint blsrc, bldst;
53 GLdouble col[4];
54 GLint pattern, factor;
55 GLboolean sallowed;
56 GLboolean tex2d;
57 GLint matrixmode;
58 GLfloat poloffs[2];
59 GLboolean poloffsfill;
60
61 std::list<Drawable*> dlist;
62};
63
64} // ns
65
66#endif
Note: See TracBrowser for help on using the repository browser.