00001 /*======================================================================= 00002 ** SGI_COPYRIGHT_TAG 00003 **=======================================================================*/ 00004 /*======================================================================= 00005 ** Author : SGI (MMM YYYY) 00006 **=======================================================================*/ 00007 00008 #ifndef _SO_HIGHLIGHT_ACTION_H_ 00009 #define _SO_HIGHLIGHT_ACTION_H_ 1 00010 00011 #include <Inventor/actions/SoGLRenderAction.h> 00012 #include <Inventor/nodes/SoMaterial.h> 00013 #include <Inventor/nodes/SoDepthOffset.h> 00014 #include <Inventor/lists/SoPathList.h> 00015 00016 class SbViewportRegion; 00017 class SoSelection; 00018 00100 { 00101 SO_ACTION_HEADER(SoShapeHighlightRenderAction); 00102 public: 00103 SoShapeHighlightRenderAction(); 00104 SoShapeHighlightRenderAction(const SbViewportRegion &viewportRegion); 00105 00106 virtual ~SoShapeHighlightRenderAction(); 00107 using SoGLRenderAction::apply; 00108 virtual void apply(SoNode *node); 00109 00115 void setColor(const SbColor& c); 00116 00120 const SbColor& getColor() const; 00121 00122 static void initClass(); 00123 static void exitClass(); 00124 00125 private: 00126 00127 void constructorCommon(); 00128 00129 SoRef<SoPath> m_selPath; // path to SoSelection node 00130 SoPathList m_highlightedPaths; 00131 SbColor m_baseColor; 00132 bool m_dirty; 00133 static void changeCB(void* userData, SoSelection* sel); 00134 }; 00135 #endif // _SO_HIGHLIGHT_ACTION_H_ 00136