MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoFlash/SoFlash.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00004 
00009 //----------------------------------------------------------------------------------
00010 
00011 #ifndef _SOFLASH_H
00012 #define _SOFLASH_H
00013 
00014 #include "SoFlashSystem.h"
00015 
00016 class SoTimerSensor;
00017 class SoFieldSensor;
00018 class SoSensor;
00019 
00021 class SOFLASH_CLASS_SPEC SoFlash : public SoNode
00022 {
00023    typedef SoNode inherited;
00024    
00025    SO_NODE_HEADER(SoFlash);
00026    
00027    private:
00028       static void _timerSensorCB(void *clientData, SoSensor *sensor);
00029       static void _fieldSensorCB(void *clientData, SoSensor *sensor);
00030 
00031       SoFieldSensor *_fieldSensor;
00032    
00033    protected:
00034       static std::list<SoFlash *>  _instanceList;
00035       
00036       SbTime  _timeOfPrevAction;
00037       float   _curBrightness;
00038       float   _dirFactor;
00039       
00040       static SoTimerSensor  *_timer;
00041       
00042       void _onChanged();
00043    
00044    protected:
00045       virtual ~SoFlash();
00046    
00047    public:
00048       SoSFColor  color;       
00049       SoSFColor  targetColor; 
00050       SoSFFloat  brightness;  
00051       SoSFTime   time;        
00052       SoSFBool   on;          
00053       SoSFColor  outputColor; 
00054 
00055       SoFlash();
00056       
00057    SoEXTENDER public:
00058       virtual void doAction(SoAction *action);
00059       virtual void GLRender(SoGLRenderAction *action);
00060       virtual void callback(SoCallbackAction *action);
00061    
00062    SoINTERNAL public:
00063       static void initClass();
00064 };
00065 
00066 #endif  // _SOFLASH_H