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 ** Author : Benjamin GRANGE (Aug 2005) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_ISOSURFACE_H_ 00026 #define _SO_ISOSURFACE_H_ 00027 00028 00029 #include <Inventor/SbBasic.h> 00030 #include <Inventor/caches/SoNodeDependencies.h> 00031 #include <Inventor/nodes/SoNode.h> 00032 #include <Inventor/nodes/SoSubNode.h> 00033 #include <Inventor/fields/SoMFNode.h> 00034 #include <VolumeViz/nodes/SoVolumeData.h> 00035 #include <VolumeViz/nodes/SoVolumeShader.h> 00036 00037 00038 /*----------------------------------------------------------------------------*/ 00039 class SoMaterial; 00040 class SoDataRange; 00041 class SoIsosurfaceTexture; 00042 class SoMaterial; 00043 class SoVolumeDataDrawStyle; 00044 00125 class SoVolumeIsosurface : public SoVolumeShader { 00126 00127 SO_NODE_HEADER(SoVolumeIsosurface); 00128 00129 public: 00133 SoVolumeIsosurface(); 00134 00138 SoMFFloat isovalues; 00139 00140 #ifndef HIDDEN_FROM_DOC 00141 private: 00142 virtual void notify(SoNotList* list); 00143 00144 virtual void GLRender(SoGLRenderAction *action); 00145 00146 // Initializes the classes. 00147 static void initClass() ; 00148 static void exitClass() ; 00149 00151 virtual void installTextures(SoGLRenderAction* action); 00152 00154 bool isFakeDrawStyleOnState(SoState* state) const; 00155 00157 virtual void allocateTextureUnit(SoGLRenderAction *action) const; 00158 00159 private: 00160 virtual void rayPick(SoRayPickAction *action); 00161 00162 private: 00163 virtual ~SoVolumeIsosurface(); 00164 00166 virtual SoShaderProgram* generateShadowShader() const; 00167 00173 virtual SbString getRenderingModeFragmentName(SoState* state); 00174 00175 #endif // HIDDEN_FROM_DOC 00176 00177 private: 00181 void handleVolumeRenderingQuality(SoState* state); 00182 00184 void updateShadowShaderIsoValue(); 00185 00187 SoVolumeDataDrawStyle* m_volumeDataDrawStyle; 00188 00189 bool m_needUpdate; 00190 }; 00191 /*----------------------------------------------------------------------------*/ 00192 00193 #endif /*_SO_ISOSURFACE_H_*/ 00194 00195 00196