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-2020 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 00389 class SoVolumeSkin : public SoSlice 00390 { 00391 SO_NODE_HEADER( SoVolumeSkin ); 00392 00393 public: 00394 00398 enum FaceMode 00399 { 00401 FRONT, 00403 BACK, 00405 FRONT_AND_BACK 00406 }; 00407 00411 SoVolumeSkin(); 00412 00421 SoSFEnum faceMode; 00422 00423 private: 00424 00432 virtual SoNode* getAlternateRep( SoAction* action ); 00433 00437 virtual bool intersect(SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId); 00438 00442 void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er); 00443 00444 private: 00448 static void initClass(); 00452 static void exitClass(); 00453 00459 virtual SoNode* createAlternateRep( SoAction *action ); 00460 00464 virtual void notify(SoNotList *list); 00465 00466 private: 00470 bool setupRenderInterface(SoAction* action); 00471 00477 SoDetail *createTriangleDetail(SoRayPickAction *, 00478 const SoPrimitiveVertex *v1, 00479 const SoPrimitiveVertex *, 00480 const SoPrimitiveVertex *, 00481 SoPickedPoint *); 00482 00484 SoVolumeSkinLdm* m_volSkinLdm; 00485 00487 SoVolumeSkinInterface* m_volSkinInterface; 00488 00489 private: 00493 virtual ~SoVolumeSkin(); 00494 00498 virtual void doRendering(SoGLRenderAction *action); 00499 00503 void generatePrimitives(SoAction *action); 00504 00505 SoVolumeStateSkin* m_vs; 00506 }; 00507 #endif // _SO_VOLUME_SKIN_ 00508 00509 00510