00001 /*============================================================================= 00002 ** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ** 00003 ** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ** 00004 ** ** 00005 ** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ** 00006 ** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ** 00007 ** WRITTEN AUTHORIZATION OF FEI S.A.S. ** 00008 ** ** 00009 ** RESTRICTED RIGHTS LEGEND ** 00010 ** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ** 00011 ** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ** 00012 ** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ** 00013 ** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ** 00014 ** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ** 00015 ** ** 00016 ** COPYRIGHT (C) 1996-2022 BY FEI S.A.S, ** 00017 ** BORDEAUX, FRANCE ** 00018 ** ALL RIGHTS RESERVED ** 00019 =============================================================================*/ 00020 00021 #pragma once 00022 00023 #include <Inventor/actions/SoGLRenderAction.h> 00024 00025 class SoHighlightRenderActionSync; 00026 class SoTraversalPassHighlight; 00027 class SoPath; 00028 class SoSelection; 00029 00030 SO_PIMPL_BASE_PUBLIC_DECLARATION( SoHighlightRenderAction ) 00031 00032 00061 class SoHighlightRenderAction : public SoGLRenderAction 00062 { 00063 SO_ACTION_HEADER( SoHighlightRenderAction ); 00064 SO_PIMPL_BASE_PUBLIC_HEADER( SoHighlightRenderAction ) 00065 00066 public: 00067 #ifndef HIDDEN_FROM_DOC 00068 00071 virtual ~SoHighlightRenderAction(); 00072 #endif // HIDDEN_FROM_DOC 00073 00075 virtual void clearApplyResult(); 00076 00082 virtual void apply( SoNode* node ); 00083 00090 void setVisible( SbBool b ); 00091 00095 SbBool isVisible() const; 00096 00097 private: 00098 static void initClass(); 00099 static void exitClass(); 00100 00104 virtual bool shouldTraverseHighlightPass() const; 00105 00106 SoEXTENDER private: 00120 virtual SoNode* getPreTraversalNode() { return nullptr; } 00121 00131 virtual SoNode* getPostTraversalNode() { return nullptr; } 00132 00133 private: 00137 SoHighlightRenderAction(); 00138 00142 SoHighlightRenderAction( const SbViewportRegion& viewportRegion ); 00143 00144 private: 00145 // Copy Constructor Forbidden 00146 SoHighlightRenderAction( const SoHighlightRenderAction& ) : SoGLRenderAction( SbVec2s( 1, 1 ) ) {} 00147 00148 void commonConstructor(); 00149 00150 friend class ::SoHighlightRenderActionSync; 00151 friend class ::SoTraversalPassHighlight; 00152 friend class inventor::impl::SoHighlightRenderActionImpl; 00153 }; 00154