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-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef SO_SLICE_H 00026 #define SO_SLICE_H 00027 00028 #include <VolumeViz/nodes/SoVolumeShape.h> 00029 00030 class SoVolumeData; 00031 class SoFragmentShader; 00032 class SoSliceInterface; 00033 00062 class SoSlice : public SoVolumeShape { 00063 SO_NODE_ABSTRACT_HEADER(SoSlice); 00064 00065 public: 00066 00082 SoSFBool enableBumpMapping; 00083 00091 SoSFFloat bumpScale; 00092 00104 SoSFNode alternateRep; 00105 00109 enum AlphaUse { 00111 ALPHA_AS_IS, 00113 ALPHA_OPAQUE, 00115 ALPHA_BINARY 00116 }; 00117 00139 SoSFEnum alphaUse; 00140 00154 SoSFBool useRGBA; 00155 00178 SoSFBool largeSliceSupport; 00179 00180 private: 00181 // Define callback used in computeGeometryAndTex 00182 typedef int textureCreateCB( int dimx, int dimy, unsigned int *texData, void *userData ); 00183 00184 static void initClass(); 00185 static void exitClass(); 00186 00191 virtual bool enableColorMap(SoState *state, 00192 SoTransferFunction::GLColorMapType colorMapInstalled, 00193 int &texType); 00194 00195 private: 00196 void GLRender(SoGLRenderAction *action); 00197 00198 private: 00199 00203 SoSlice(); 00204 00208 virtual ~SoSlice(); 00209 00210 #ifndef HIDDEN_FROM_DOC 00211 00212 //Return false if normal rendering can't be done 00213 bool handleAlternateRep(SoGLRenderAction *action, SoVolumeData *volumeDataNode); 00214 00215 virtual bool isTransparent(SoState *state); 00216 00220 virtual void installClippingPlanes(SoState * SO_UNUSED_PARAM(state)) {} 00221 00222 #endif // HIDDEN_FROM_DOC 00223 SoSliceInterface* m_commonSliceInterface; 00224 }; 00225 00226 #endif 00227 00228 00229