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_ORTHO_SLICE_ 00024 #define _SO_ORTHO_SLICE_ 00025 00026 #ifdef _WIN32 00027 #pragma warning( push ) 00028 #pragma warning(disable:4251) 00029 #endif 00030 00031 #include <VolumeViz/nodes/SoSlice.h> 00032 #include <Inventor/fields/SoSFInt32.h> 00033 #include <Inventor/SbPImpl.h> 00034 00035 class SoChildList; 00036 00037 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoOrthoSlice) 00038 00039 00450 class SoOrthoSlice : public SoSlice 00451 { 00452 SO_NODE_HEADER( SoOrthoSlice ); 00453 SO_PIMPL_BASE_PUBLIC_HEADER( SoOrthoSlice ); 00454 00455 public: 00456 00468 SoSFInt32 dataSetId; 00469 00473 SoSFUInt32 sliceNumber; 00474 00476 enum Axis { 00478 X, 00480 Y, 00482 Z 00483 }; 00484 00489 SoSFEnum axis; 00490 00492 enum ClippingSide 00493 { 00495 FRONT, 00497 BACK 00498 }; 00499 00528 SoSFEnum clippingSide; 00529 00537 SoSFBool clipping; 00538 00544 SoSFBool enableBorder; 00545 00551 SoSFColor borderColor; 00552 00559 SoSFFloat borderWidth; 00560 00594 SoSFBool enableImage; 00595 00599 SoOrthoSlice(); 00600 00606 virtual SbBool affectsState() const; 00607 00608 private: 00612 void computeBBox(SoAction*, SbBox3f& box, SbVec3f& center); 00613 00618 virtual void write(SoWriteAction* action); 00619 00626 virtual SoNode* getAlternateRep(SoAction* action); 00627 00629 virtual void doAction(SoAction* action); 00631 virtual void GLRender(SoGLRenderAction* action); 00633 virtual void callback(SoCallbackAction* action); 00635 virtual void rayPick(SoRayPickAction* action); 00637 virtual void getBoundingBox(SoGetBoundingBoxAction* action); 00638 00639 private: 00640 00641 //@TR enableBorder @TD FALSE 00642 //@TR borderColor @TD 0.84 0.43 0.02 00643 //@TR borderWidth @TD 2.0 00644 //@TR renderSlice @TD TRUE 00645 00646 static void initClass(); 00647 static void exitClass(); 00648 00652 virtual void notify( SoNotList* list ); 00653 00654 virtual SoChildList* getChildren() const; 00655 00659 void setBackFace( SoAction* action, bool backFace ); 00660 00664 virtual bool intersect( SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId ); 00665 00669 void preventBorderDrawing( const bool enable ); 00670 00674 void setForcedPick( const bool enable ); 00675 00676 private: 00677 virtual void generatePrimitives( SoAction* action ); 00678 virtual void doRendering( SoGLRenderAction* action ); 00679 00684 virtual SbBool readInstance(SoInput* in, unsigned short flags); 00685 00686 SoINTERNAL private: 00687 00688 virtual void ldmAction( SoLdmValuationAction* action ); 00689 00690 #ifndef HIDDEN_FROM_DOC 00691 private: 00693 virtual ~SoOrthoSlice(); 00694 #endif // HIDDEN_FROM_DOC 00695 }; 00696 00697 #ifdef _WIN32 00698 #pragma warning( pop ) 00699 #endif 00700 #endif // _SO_ORTHO_SLICE_ 00701 00702