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_OBLIQUE_SLICE_ 00024 #define _SO_OBLIQUE_SLICE_ 00025 00026 #ifdef _MSC_VER 00027 #pragma warning( push ) 00028 #pragma warning(disable:4251) 00029 #endif 00030 00031 #include <Inventor/nodes/SoShape.h> 00032 #include <Inventor/fields/SoSFBool.h> 00033 #include <Inventor/fields/SoSFFloat.h> 00034 #include <Inventor/fields/SoSFEnum.h> 00035 #include <Inventor/fields/SoSFPlane.h> 00036 #include <Inventor/fields/SoSFNode.h> 00037 #include <Inventor/STL/vector> 00038 #include <VolumeViz/nodes/SoVolumeRendering.h> 00039 #include <VolumeViz/nodes/SoSlice.h> 00040 00041 class SoVolumeData; 00042 class SoCache; 00043 class SoLDMObliqueSliceGeom; 00044 00045 class SoObliqueSliceLdm; 00046 class SoObliqueSliceInterface; 00047 class SoObliqueSlicePaging; 00048 class SoVolumeStateObliqueSlice; 00049 00389 class SoObliqueSlice : public SoSlice { 00390 SO_NODE_HEADER( SoObliqueSlice ); 00391 00392 public: 00393 00397 SoSFPlane plane; 00398 00402 SoObliqueSlice(); 00403 00404 private: 00408 void computeBBox(SoAction *, SbBox3f &box, SbVec3f ¢er); 00409 00414 virtual void write(SoWriteAction *action); 00415 00422 virtual SoNode* getAlternateRep( SoAction* action ); 00423 00424 virtual void GLRender( SoGLRenderAction* action ); 00425 00426 private: 00430 void setupSliceInterface(); 00431 00435 void generatePrimitives(SoAction *action); 00436 00440 SoDetail *createTriangleDetail( SoRayPickAction *, 00441 const SoPrimitiveVertex *v1, 00442 const SoPrimitiveVertex *, 00443 const SoPrimitiveVertex *, 00444 SoPickedPoint *); 00445 00449 void doRendering(SoGLRenderAction *action); 00450 00455 virtual SbBool readInstance(SoInput *in, unsigned short flags); 00456 00457 private: 00461 static void initClass(); 00462 static void exitClass(); 00463 00470 virtual SoNode* createAlternateRep( SoAction *action ); 00471 00475 virtual void notify(SoNotList *list); 00476 00477 bool m_backFace; 00478 00479 private: 00480 00484 virtual ~SoObliqueSlice(); 00485 00489 SbBool m_altRepCreatedHere; 00490 00491 SoObliqueSliceInterface* m_sliceInterface; 00492 SoObliqueSliceLdm* m_sliceLdm; 00493 00494 SoVolumeStateObliqueSlice* m_vs; 00495 }; 00496 00497 #ifdef _MSC_VER 00498 #pragma warning( pop ) 00499 #endif 00500 00501 #endif // _SO_OBLIQUE_SLICE_ 00502 00503