COPASI API  4.16.103
qwt3dColor.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/barChart/qwt3dColor.h,v $
3 // $Revision: 1.1 $
4 // $Name: $
5 // $Author: akoenig $
6 // $Date: 2007/11/12 17:01:07 $
7 // End CVS Header
8 
9 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc. and EML Research, gGmbH.
11 // All rights reserved.
12 
13 #ifndef BAR_COLOR_H
14 #define BAR_COLOR_H
15 
16 #include "qwt3d_plot.h"
17 
18 class QWT3D_EXPORT BarColor : public Qwt3D::Color
19  {
20  public:
21  //! Initializes with data and set up a ColorVector with a size of 100 z values (default);
22  explicit BarColor(Qwt3D::Plot3D* data, unsigned size = 100, double min = 0, double max = 0);
23  Qwt3D::RGBA operator()(double x, double y, double z) const; //!< Receives z-dependend color from ColorVector
24  void setColorVector(Qwt3D::ColorVector const& cv);
25  void reset(unsigned size = 100); //!< Resets the standard colors;
26  void setAlpha(double a); //!< Sets unitary alpha value for all colors
27 
28  /**
29  * Creates a color vector used by ColorLegend.
30  * This is essentially a copy from the internal used vector.
31  * \return The vector created
32  */
33  Qwt3D::ColorVector& createVector(Qwt3D::ColorVector& vec) {vec = colors_; return vec;}
34 
35  double maxZ;
36  double minZ;
37  protected:
38  Qwt3D::ColorVector colors_;
39  Qwt3D::Plot3D* data_;
40  };
41 
42 #endif // BAR_COLOR_H
Qwt3D::Plot3D * data_
Definition: qwt3dColor.h:39
double maxZ
Definition: qwt3dColor.h:35
Qwt3D::ColorVector colors_
Definition: qwt3dColor.h:38
Qwt3D::ColorVector & createVector(Qwt3D::ColorVector &vec)
Definition: qwt3dColor.h:33
double minZ
Definition: qwt3dColor.h:36
#define min(a, b)
Definition: f2c.h:175
#define max(a, b)
Definition: f2c.h:176