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 : R. ALBOU (Jan 2005) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_INDEXED_TEXTURE2_ 00025 #define _SO_INDEXED_TEXTURE2_ 00026 00027 #include <Inventor/fields/SoSFFloat.h> 00028 #include <Inventor/fields/SoSFEnum.h> 00029 #include <Inventor/fields/SoSFArray2D.h> 00030 00031 #include <Inventor/nodes/SoNode.h> 00032 #include <Inventor/nodes/SoTexture2.h> 00033 #include <Inventor/threads/SbThreadStorage.h> 00034 #include <Inventor/caches/SoCache.h> 00035 00036 #include <Inventor/sensors/SoFieldSensor.h> 00037 00038 class SoGLRenderAction ; 00039 class SoCallbackAction ; 00040 class SoColorMap; 00041 00042 #ifdef _MSC_VER 00043 #pragma warning( push ) 00044 #pragma warning(disable:4251) 00045 #endif 00046 00047 SO_PIMPL_PUBLIC_DECLARATION(SoIndexedTexture2); 00048 00049 /*----------------------------------------------------------------------------*/ 00050 00317 class SoIndexedTexture2 : public SoTexture { 00318 SO_NODE_HEADER(SoIndexedTexture2) ; 00319 00320 SO_PIMPL_PUBLIC_HEADER(SoIndexedTexture2); 00321 00322 public: 00338 SoSFFloat minValue ; 00339 00343 SoSFFloat maxValue ; 00344 00350 SoSFArray2D imageIndex ; 00351 00439 SoSFBool rescaleTexCoord; 00440 00446 SoSFEnum wrapT ; 00447 00452 void computeDataRange(); 00453 00457 SoIndexedTexture2() ; 00458 00459 private: 00460 virtual void doAction( SoAction* action ); 00461 virtual void GLRender( SoGLRenderAction* action ); 00462 00467 virtual SoNode* getAlternateRep( SoAction* action ); 00468 00469 /*----------------------------------------------------------------------------*/ 00470 00471 private: 00472 static void initClass() ; 00473 static void exitClass() ; 00474 00480 virtual SoNode* createAlternateRep( SoAction *action ); 00481 00482 // Manage field dependencies when one of them change AJO eBug #1972 00483 virtual void fieldHasChanged( SoField *field ); // override of SoFieldContainer 00484 00485 private: 00486 // Destructor 00487 virtual ~SoIndexedTexture2() ; 00488 00489 } ; 00490 /*----------------------------------------------------------------------------*/ 00491 00492 #ifdef _MSC_VER 00493 #pragma warning( pop ) 00494 #endif 00495 00496 #endif /* _SO_INDEXED_TEXTURE2_ */ 00497 00498 00499