MeVisLab Toolbox Reference
SoFlash.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef SO_FLASH_H
14 #define SO_FLASH_H
15 
16 
18 
19 #include "SoFlashSystem.h"
20 
21 class SoTimerSensor;
22 class SoFieldSensor;
23 class SoSensor;
24 
26 class SOFLASH_CLASS_SPEC SoFlash : public SoNode
27 {
28  typedef SoNode inherited;
29 
30  SO_NODE_HEADER(SoFlash);
31 
32  private:
33  static void _timerSensorCB(void *clientData, SoSensor *sensor);
34 
35  protected:
36  static std::list<SoFlash *> _instanceList;
37 
40  float _dirFactor;
41 
42  static SoTimerSensor *_timer;
43 
44  void _onChanged(SoField* field = nullptr);
45 
46  protected:
47  ~SoFlash() override;
48 
49  public:
50  SoSFColor color;
51  SoSFColor targetColor;
52  SoSFFloat brightness;
53  SoSFTime time;
54  SoSFBool on;
55  SoSFColor outputColor;
56 
58 
59  SoEXTENDER public:
60  void doAction(SoAction *action) override;
61  void GLRender(SoGLRenderAction *action) override;
62  void callback(SoCallbackAction *action) override;
63 
64  SoINTERNAL public:
65  static void initClass();
66 };
67 
68 #endif // _SOFLASH_H
#define SOFLASH_CLASS_SPEC
System dependent includes. Disables some compiler/linker warnings.
Definition: SoFlashSystem.h:24
OpenInventor node SoFlash provides a changing material node that blends one color into another.
Definition: SoFlash.h:27
SbTime _timeOfPrevAction
Definition: SoFlash.h:38
SoSFColor color
Starting color of the flash.
Definition: SoFlash.h:50
float _curBrightness
Definition: SoFlash.h:39
static void initClass()
void _onChanged(SoField *field=nullptr)
SoSFTime time
Time for one period.
Definition: SoFlash.h:53
SoSFFloat brightness
Brightness of the flash (0-1)
Definition: SoFlash.h:52
SoSFColor outputColor
The output color, for field connections.
Definition: SoFlash.h:55
void GLRender(SoGLRenderAction *action) override
void doAction(SoAction *action) override
static std::list< SoFlash * > _instanceList
Definition: SoFlash.h:36
~SoFlash() override
SoSFBool on
Definition: SoFlash.h:54
float _dirFactor
Definition: SoFlash.h:40
SoSFColor targetColor
Target color of the flash.
Definition: SoFlash.h:51
void callback(SoCallbackAction *action) override
static SoTimerSensor * _timer
Definition: SoFlash.h:42