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 : Benjamin GRANGE (Aug 2006) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef SO_UNIFORM_GRID_CLIPPING 00026 #define SO_UNIFORM_GRID_CLIPPING 00027 00028 #include <Inventor/nodes/SoTexture2.h> 00029 #include <Inventor/fields/SoSFBox3f.h> 00030 #include <Inventor/SbBox.h> 00031 #include <Inventor/STL/vector> 00032 #include <LDM/SoLDMTileID.h> 00033 00034 class SoShaderObject; 00035 class SoShaderProgram; 00036 class SoFragmentShader; 00037 class SoVertexShader; 00038 class SoState; 00039 class SoVolumeData; 00040 class SoROI; 00041 class SoLDMNodeFrontMgrOctree; 00042 class SoCache; 00043 00044 SO_PIMPL_PUBLIC_DECLARATION(SoUniformGridClipping); 00045 00252 class SoUniformGridClipping : public SoTexture2 00253 { 00254 00255 SO_NODE_HEADER(SoUniformGridClipping); 00256 00257 SO_PIMPL_PUBLIC_HEADER(SoUniformGridClipping); 00258 00259 public: 00263 SoUniformGridClipping(); 00264 00270 SoSFBox3f extent; 00271 00273 enum Axis { 00275 X, 00277 Y, 00279 Z 00280 }; 00281 00288 SoSFEnum axis; 00289 00304 SoSFFloat thickness; 00305 00312 SoSFBool clipBelow; 00313 00320 SoSFBool clipAbove; 00321 00328 SoSFFloat undefinedValue; 00329 00339 static SbBool isSupported(SoState* state=NULL) ; 00340 00344 static int getMaxNumberOfUniformGrids(SoState* state=NULL); 00345 00346 #if 1 SoDEPRECATED 00349 SoSFBox3f size; 00350 00351 #endif 00353 private: 00354 virtual void GLRender(SoGLRenderAction *action); 00355 virtual void getBoundingBox(SoGetBoundingBoxAction *action); 00356 virtual void doAction(SoAction *action); 00357 virtual void doActionOnRTT(SoAction *action); 00358 virtual void rayPick(SoRayPickAction *action); 00359 00360 private: 00361 00371 SoSFBool revertMode; 00372 00373 static void initClass() ; 00374 static void exitClass() ; 00375 00377 virtual void notify(SoNotList *list); 00378 00380 virtual void fieldHasChanged( SoField *field ); // override of SoTexture2 00381 00382 private: 00383 00385 virtual ~SoUniformGridClipping(); 00386 00387 private: 00388 00389 void commonConstructor(); 00390 00391 #ifndef HIDDEN_FROM_DOC 00392 // friendship needed to access pimpl 00393 friend class SoVolumeState; 00394 friend class SoUniformGridClippingElement; 00395 #endif 00396 }; 00397 00398 #endif 00399 00400 00401