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-2014 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Patrick Vigneras (Nov 1999) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_TEXTURE_3_ 00025 #define _SO_TEXTURE_3_ 00026 00027 #include <Inventor/fields/SoSFColor.h> 00028 #include <Inventor/fields/SoSFEnum.h> 00029 #include <Inventor/fields/SoSFImage3.h> 00030 #include <Inventor/fields/SoMFFilePathString.h> 00031 #include <Inventor/fields/SoSFBool.h> 00032 #include <Inventor/image/SbRasterImage.h> 00033 #include <Inventor/nodes/SoNode.h> 00034 #include <Inventor/nodes/SoTexture.h> 00035 #include <Inventor/sys/SoGLType.h> 00036 #include <Inventor/threads/SbThreadStorage.h> 00037 #include <Inventor/elements/SoTextureImage3Element.h> 00038 00039 class SoSensor; 00040 class SbThreadRWMutex; 00041 00042 SO_PIMPL_PUBLIC_DECLARATION(SoTexture3); 00043 00045 // 00046 // Class: SoTexture3 00047 // 00048 // Texture node. 00049 // 00051 00173 class SoTexture3 : public SoTexture { 00174 00175 SO_NODE_HEADER(SoTexture3); 00176 00177 SO_PIMPL_PUBLIC_HEADER(SoTexture3); 00178 00179 public: 00180 00182 enum Layout { 00186 VOLUME = 0, 00187 00191 ARRAY = 1, 00192 }; 00193 00213 SoMFFilePathString filenames; 00214 00222 SoSFImage3 images; 00223 00229 SoSFEnum wrapT; 00230 00236 SoSFEnum wrapR; 00237 00250 SoSFEnum layout; 00251 00255 SoTexture3(); 00256 00257 private: 00258 virtual void doAction(SoAction *action); 00259 virtual void GLRender(SoGLRenderAction *action); 00260 00261 private: 00262 static void initClass(); 00263 static void exitClass(); 00264 00265 // Manages field dependencies, when one of them change 00266 virtual void fieldHasChanged( SoField *field ); // override of SoFieldContainer 00267 00268 private: 00269 // Reads stuff into instance. Returns FALSE on error. 00270 virtual SbBool readInstance(SoInput *in, unsigned short flags); 00271 00272 virtual ~SoTexture3(); 00273 00274 private: 00275 00276 friend class SoGLTextureImage3Element; 00277 }; 00278 00279 #endif /* _SO_TEXTURE_3_ */ 00280 00281