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_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/SbPImpl.h> 00033 00034 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoOrthoSlice) 00035 00036 00418 class SoOrthoSlice : public SoSlice 00419 { 00420 SO_NODE_HEADER( SoOrthoSlice ); 00421 SO_PIMPL_BASE_PUBLIC_HEADER( SoOrthoSlice ); 00422 00423 public: 00424 00428 SoSFUInt32 sliceNumber; 00429 00431 enum Axis { 00433 X, 00435 Y, 00437 Z 00438 }; 00439 00444 SoSFEnum axis; 00445 00447 enum ClippingSide 00448 { 00450 FRONT, 00452 BACK 00453 }; 00454 00483 SoSFEnum clippingSide; 00484 00492 SoSFBool clipping; 00493 00497 SoOrthoSlice(); 00498 00502 virtual bool intersect(SoLDMNodeFrontManager* nfm, const SoLDMTileID& tileId); 00503 00504 private: 00508 void computeBBox(SoAction*, SbBox3f& box, SbVec3f& center); 00509 00514 virtual void write(SoWriteAction* action); 00515 00522 virtual SoNode* getAlternateRep(SoAction* action); 00523 00524 private: 00525 00526 static void initClass(); 00527 static void exitClass(); 00528 00532 virtual void notify( SoNotList* list ); 00533 00539 virtual SbBool affectsState() const; 00540 00544 void setBackFace( SoAction* action, bool backFace ); 00545 00546 private: 00547 virtual void doAction( SoAction* action ); 00548 virtual void GLRender( SoGLRenderAction* action ); 00549 virtual void callback( SoCallbackAction* action ); 00550 virtual void rayPick( SoRayPickAction* action ); 00551 virtual void getBoundingBox( SoGetBoundingBoxAction* action ); 00552 00553 private: 00554 virtual void generatePrimitives( SoAction* action ); 00555 virtual void doRendering( SoGLRenderAction* action ); 00556 00561 virtual SbBool readInstance(SoInput* in, unsigned short flags); 00562 00563 SoINTERNAL private: 00564 00565 virtual void ldmAction( SoLdmValuationAction* action ); 00566 00567 #ifndef HIDDEN_FROM_DOC 00568 private: 00570 virtual ~SoOrthoSlice(); 00571 #endif // HIDDEN_FROM_DOC 00572 00573 private: 00574 00575 void commonConstructor(); 00576 }; 00577 00578 #ifdef _WIN32 00579 #pragma warning( pop ) 00580 #endif 00581 #endif // _SO_ORTHO_SLICE_ 00582 00583