00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SBTVIZCOLORSCALE_H
00025 #define SBTVIZCOLORSCALE_H
00026
00027 #include <Inventor/SbLinear.h>
00028 #include <Inventor/fields/SoSFBool.h>
00029 #include <Inventor/SbColor.h>
00030
00031 class SoDEPRECATED SbTVizColorScale {
00065
00066 public :
00067
00068 enum ColorMode {
00072 TVIZ_SHADING = 0,
00076 TVIZ_CONTOURING
00077 };
00078
00079
00083 SbTVizColorScale();
00084
00085
00090 SbTVizColorScale(const SbTVizColorScale& colorScale);
00091
00092
00096 virtual ~SbTVizColorScale();
00097
00098
00103 void setColors(int numColors, const SbColor* colors);
00104
00105
00109 const SbColor* getColors() const;
00110
00111
00115 int getNumColors() const;
00116
00121 void setAltitudes(int numAltitudes, const float* altitudes);
00122
00126 const float* getAltitudes() const;
00127
00131 int getNumAltitudes() const;
00132
00138 void setExtremeColors(SbColor& lowerColor, SbColor& upperColor);
00139
00143 void getExtremeColors(SbColor& lowerColor, SbColor& upperColor) const;
00144
00148 void getColor(float altitude, SbColor& color) const;
00149
00150
00154 void setColorMode(ColorMode colorMode);
00155
00159 ColorMode getColorMode() const;
00160
00161
00162
00163
00164 private:
00165 void rotate(double angle);
00166 void resetChangeFlag() {m_changeFlag = FALSE;};
00167 SbBool hasChanged() {return m_changeFlag;};
00168
00169 private :
00170 SbBool m_changeFlag;
00171 ColorMode m_colorMode;
00172 int m_numColors;
00173 int m_numAltitudes;
00174 float* m_altitudes;
00175 SbColor* m_colors;
00176 SbColor m_defaultUpperColor;
00177 SbColor m_defaultLowerColor;
00178 };
00179
00180 #endif
00181
00182
00183