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 _SO_COLOR_MAP_
00025 #define _SO_COLOR_MAP_
00026
00027 #include <Inventor/nodes/SoNode.h>
00028 #include <Inventor/fields/SoSFFloat.h>
00029 #include <Inventor/fields/SoMFFloat.h>
00030 #include <Inventor/fields/SoSFEnum.h>
00031 #include <Inventor/SbPImpl.h>
00032
00033 #ifdef _MSC_VER
00034 #pragma warning( push )
00035 #pragma warning(disable:4251)
00036 #endif
00037
00038 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoColorMap)
00039
00040
00140 class SoColorMap : public SoNode {
00141 SO_NODE_HEADER(SoColorMap) ;
00142
00143 SO_PIMPL_BASE_PUBLIC_HEADER(SoColorMap)
00144
00145 public:
00147 enum ColorMapFormat {
00149 LUMINANCE,
00151 ALPHA,
00152
00154 LUMINANCE_ALPHA,
00155
00157 RGB,
00158
00160 RGB_ALPHA
00161 } ;
00162
00164 enum PredefinedColorMap {
00166 NONE,
00168 GRAY,
00170 TEMPERATURE,
00172 PHYSICS,
00174 STANDARD,
00176 GLOW,
00178 BLUE_RED,
00180 SEISMIC,
00182 BLUE_WHITE_RED,
00184 INTENSITY,
00186 LABEL_256,
00188 VOLREN_RED,
00190 VOLREN_GREEN,
00192 AIRWAY,
00194 AIRWAY_SURFACES,
00196 INTENSITY_REVERSED
00197 } ;
00198
00217 SoSFFloat min ;
00218
00222 SoSFFloat max ;
00223
00251 SoSFEnum predefinedColorMap ;
00252
00273 SoSFEnum colorMapFormat ;
00274
00282 SoMFFloat colorMap ;
00283
00288 enum Interpolation
00289 {
00291 NEAREST,
00293 LINEAR
00294 };
00295
00304 SoSFEnum interpolation;
00305
00309 SoColorMap() ;
00310
00315 unsigned int getNumColor() const;
00316
00321 SbBool hasTransparency() const;
00322
00323 private:
00324 virtual void doAction(SoAction *action);
00325 virtual void GLRender(SoGLRenderAction *action) ;
00326 virtual void callback( SoCallbackAction* action );
00327
00328
00329
00330 private:
00331
00332 static void initClass();
00333 static void exitClass();
00334
00338 virtual void notify(SoNotList *list);
00339
00340
00341 void enableFragment(SoState* state, SbBool enable);
00342
00343 void installGLColorMap(SoState* state) ;
00344
00345
00346
00347
00348 void reMap(float minType, float maxType, SbBool forceUpdate = FALSE);
00349
00350
00351 unsigned int* getPackedColorMap() const;
00352
00357 virtual bool affectsPath() const;
00358
00359 private:
00360
00364 virtual ~SoColorMap();
00365
00366 private :
00367
00368
00369 void construct();
00370
00371 } ;
00372
00373
00374 #ifdef _MSC_VER
00375 #pragma warning( pop )
00376 #endif
00377
00378 #endif
00379
00380
00381