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-2021 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 00143 SoSFEnum alphaUse; 00144 00158 SoSFBool useRGBA; 00159 00182 SoSFBool largeSliceSupport; 00183 00184 private: 00185 // Define callback used in computeGeometryAndTex 00186 typedef int textureCreateCB( int dimx, int dimy, unsigned int *texData, void *userData ); 00187 00188 static void initClass(); 00189 static void exitClass(); 00190 00195 virtual bool enableColorMap(SoState *state, 00196 SoTransferFunction::GLColorMapType colorMapInstalled, 00197 int &texType); 00198 00199 private: 00201 virtual void GLRender(SoGLRenderAction* action); 00202 00203 private: 00204 00208 SoSlice(); 00209 00213 virtual ~SoSlice(); 00214 00215 #ifndef HIDDEN_FROM_DOC 00216 00217 //Return false if normal rendering can't be done 00218 bool handleAlternateRep(SoGLRenderAction *action, SoVolumeData *volumeDataNode); 00219 00220 virtual bool isTransparent(SoState *state); 00221 00225 virtual void installClippingPlanes(SoState * SO_UNUSED_PARAM(state)) {} 00226 00227 #endif // HIDDEN_FROM_DOC 00228 }; 00229 00230 #endif 00231 00232 00233