COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
WSColormap.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef WSCOLORMAP_H
9 #define WSCOLORMAP_H
10 
11 #include "WSCoviseStub.h"
12 
13 #include <QList>
14 #include <QString>
15 
16 namespace covise
17 {
18 
20 {
21 
22 public:
24  {
25  r = 0.0f;
26  g = 0.0f;
27  b = 0.0f;
28  a = 0.0f;
29  position = 0.0f;
30  }
31 
32  WSColormapPin(float red, float green, float blue, float alpha, float pos)
33  {
34  r = red;
35  g = green;
36  b = blue;
37  a = alpha;
38  position = pos;
39  }
40 
41  WSColormapPin(const covise::covise__ColormapPin &pin)
42  {
43  r = pin.r;
44  g = pin.g;
45  b = pin.b;
46  a = pin.a;
47  position = pin.position;
48  }
49  virtual ~WSColormapPin(){};
50 
51  virtual covise::covise__ColormapPin getSerialisable() const;
52 
53  QString toString() const;
54 
55  float r;
56  float g;
57  float b;
58  float a;
59  float position;
60 };
61 
63 {
64 public:
65  WSColormap();
66  WSColormap(const QString &name, const QList<WSColormapPin> &pins);
67  WSColormap(const covise::covise__Colormap &colormap);
68  virtual ~WSColormap()
69  {
70  }
71 
72  const QList<WSColormapPin> &getPins() const
73  {
74  return this->pins;
75  }
76 
77  virtual covise::covise__Colormap getSerialisable() const;
78 
79  void setFromSerialisable(const covise::covise__Colormap &serialisable);
80 
81  QString toString() const;
82  QString toCoviseString() const;
83 
84 private:
85  QString name;
86  QList<WSColormapPin> pins;
87 };
88 }
89 #endif // WSCOLORMAP_H
float position
Definition: WSColormap.h:59
GLfloat green
Definition: khronos-glext.h:6341
GLfloat GLfloat blue
Definition: khronos-glext.h:6341
GLboolean GLboolean GLboolean b
Definition: khronos-glext.h:6895
const QList< WSColormapPin > & getPins() const
Definition: WSColormap.h:72
Definition: WSColormap.h:62
float a
Definition: WSColormap.h:58
float b
Definition: WSColormap.h:57
WSColormapPin(float red, float green, float blue, float alpha, float pos)
Definition: WSColormap.h:32
GLfloat GLfloat GLfloat alpha
Definition: khronos-glext.h:6341
QList< WSColormapPin > pins
Definition: WSColormap.h:86
GLdouble GLdouble GLdouble r
Definition: khronos-glext.h:6457
Definition: WSColormap.h:19
float g
Definition: WSColormap.h:56
GLboolean GLboolean GLboolean GLboolean a
Definition: khronos-glext.h:6895
WSColormapPin(const covise::covise__ColormapPin &pin)
Definition: WSColormap.h:41
QString name
Definition: WSColormap.h:85
float r
Definition: WSColormap.h:55
GLuint const GLchar * name
Definition: khronos-glext.h:6722
GLboolean GLboolean g
Definition: khronos-glext.h:6895
virtual ~WSColormapPin()
Definition: WSColormap.h:49
WSColormapPin()
Definition: WSColormap.h:23
#define WSLIBEXPORT
Definition: coExport.h:355
virtual ~WSColormap()
Definition: WSColormap.h:68