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 : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_TEXTURE_CUBE_MAP_ 00026 #define _SO_TEXTURE_CUBE_MAP_ 00027 00028 #include <Inventor/fields/SoSFColor.h> 00029 #include <Inventor/fields/SoSFEnum.h> 00030 #include <Inventor/fields/SoSFImage.h> 00031 #include <Inventor/fields/SoMFFilePathString.h> 00032 #include <Inventor/fields/SoSFBool.h> 00033 #include <Inventor/fields/SoSFNode.h> 00034 #include <Inventor/nodes/SoNode.h> 00035 #include <Inventor/nodes/SoTexture.h> 00036 #include <Inventor/image/SbRasterImage.h> 00037 #include <Inventor/sys/SoGLType.h> 00038 #include <Inventor/threads/SbThreadStorage.h> 00039 00040 class SoSensor; 00041 class SbThreadRWMutex; 00042 00043 #ifdef _MSC_VER 00044 #pragma warning( push ) 00045 #pragma warning(disable:4251) 00046 #endif 00047 00049 // 00050 // Class: SoTextureCubeMap 00051 // 00052 // Texture node. 00053 // 00055 00056 class SoTextureCubeMap; 00057 typedef SbBool CubeMapPrequalifyFileCallback(const SbString &, void *, SoTextureCubeMap *); 00058 00059 SO_PIMPL_PUBLIC_DECLARATION(SoTextureCubeMap); 00060 00226 class SoTextureCubeMap : public SoTexture { 00227 00228 SO_NODE_HEADER(SoTextureCubeMap); 00229 00230 SO_PIMPL_PUBLIC_HEADER(SoTextureCubeMap); 00231 00232 public: 00233 00248 SoMFFilePathString filenames; 00249 00257 SoSFImage imagePosX; 00261 SoSFImage imagePosY; 00265 SoSFImage imagePosZ; 00269 SoSFImage imageNegX; 00273 SoSFImage imageNegY; 00277 SoSFImage imageNegZ; 00278 00284 SoSFEnum wrapT; 00290 SoSFEnum wrapR; 00291 00302 SoSFNode renderToTextureProperty; 00303 00304 00309 SoSFFloat HDRIExposure; 00310 00314 SoTextureCubeMap(); 00315 00316 private: 00317 virtual void doAction(SoAction *action); 00318 virtual void GLRender(SoGLRenderAction *action); 00319 00320 static void setPrequalifyFileCallBack(CubeMapPrequalifyFileCallback *p_cb, void *u_data); 00321 static CubeMapPrequalifyFileCallback *getPrequalifyFileCallBack( void *&user_data ); 00322 void allowPrequalifyFile(SbBool); 00323 SbBool isAllowPrequalifyFile() const; 00324 00325 00326 private: 00327 static void initClass(); 00328 static void exitClass(); 00329 00330 // Manages field dependencies, when one of them change 00331 virtual void fieldHasChanged( SoField *field ); // override of SoFieldContainer 00332 00333 virtual void copyContents(const SoFieldContainer *fromFC, SbBool copyConnections); 00334 00335 private: 00336 // Reads stuff into instance. Returns FALSE on error. 00337 virtual SbBool readInstance(SoInput *in, unsigned short flags); 00338 00339 virtual ~SoTextureCubeMap(); 00340 00341 }; 00342 00343 #ifdef _MSC_VER 00344 #pragma warning( pop ) 00345 #endif 00346 00347 #endif /* _SO_TEXTURE_CUBE_MAP_ */ 00348 00349 00350