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-2022 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : P. ESTRADE (Mar 2000) 00022 **=======================================================================*/ 00023 #ifndef _SO_VOLUME_SKIN_ 00024 #define _SO_VOLUME_SKIN_ 00025 00026 #include <Inventor/nodes/SoShape.h> 00027 #include <Inventor/fields/SoSFBool.h> 00028 #include <Inventor/fields/SoSFEnum.h> 00029 #include <Inventor/fields/SoSFFloat.h> 00030 #include <Inventor/fields/SoSFVec3f.h> 00031 #include <Inventor/fields/SoSFInt32.h> 00032 #include <Inventor/SbBox.h> 00033 00034 #include <VolumeViz/nodes/SoSlice.h> 00035 00036 class SoVertexShader; 00037 class SoVolumeSkinLdm; 00038 class SoVolumeSkinInterface; 00039 class SoVolumeStateSkin; 00040 class SoGetBoundingBoxAction; 00041 00411 class SoVolumeSkin : public SoSlice 00412 { 00413 SO_NODE_HEADER( SoVolumeSkin ); 00414 00415 public: 00416 00420 enum FaceMode 00421 { 00423 FRONT, 00425 BACK, 00427 FRONT_AND_BACK 00428 }; 00429 00433 SoVolumeSkin(); 00434 00446 SoSFInt32 dataSetId; 00447 00456 SoSFEnum faceMode; 00457 00458 private: 00459 00467 virtual SoNode* getAlternateRep( SoAction* action ); 00468 00470 virtual void GLRender(SoGLRenderAction* action); 00471 00475 void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er); 00476 00477 private: 00481 static void initClass(); 00485 static void exitClass(); 00486 00492 virtual SoNode* createAlternateRep( SoAction *action ); 00493 00497 virtual void notify(SoNotList *list); 00498 00502 virtual bool intersect( SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId ); 00503 00504 private: 00508 bool setupRenderInterface(SoAction* action); 00509 00511 SoVolumeSkinLdm* m_volSkinLdm; 00512 00514 SoVolumeSkinInterface* m_volSkinInterface; 00515 00516 private: 00520 virtual ~SoVolumeSkin(); 00521 00525 virtual void doRendering(SoGLRenderAction *action); 00526 00530 void generatePrimitives(SoAction *action); 00531 00537 SoDetail *createTriangleDetail(SoRayPickAction *, 00538 const SoPrimitiveVertex *v1, 00539 const SoPrimitiveVertex *, 00540 const SoPrimitiveVertex *, 00541 SoPickedPoint *); 00542 00543 SoVolumeStateSkin* m_vs; 00544 }; 00545 #endif // _SO_VOLUME_SKIN_ 00546 00547 00548