MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoUtils/SoSlabRenderingElement.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00003 
00009 #ifndef  _SoSlabRenderingElement_H
00010 #define  _SoSlabRenderingElement_H
00011 
00012 #include "SoUtilsSystem.h"
00013 
00014 #include <Inventor/elements/SoReplacedElement.h>
00015 
00017 enum SlabRenderingSamplingMode {
00018   EXACT_SLICE_SAMPLING,         
00019   ALLOW_RESAMPLING              
00020 };
00021 
00022 
00024 class SOUTILS_EXPORT SbSlabRenderingProperties
00025 {
00026   public:
00027 
00028     bool enabled; 
00029     
00030     SbPlane frontPlane; 
00031     SbPlane backPlane;  
00032 
00033     SbVec3f worldPositionOnSlice;     
00034     SbVec3f worldPositionOnNextSlice; 
00035 
00036     SlabRenderingSamplingMode samplingMode; 
00037 
00038     SbSlabRenderingProperties() :
00039       enabled(false), samplingMode(EXACT_SLICE_SAMPLING)
00040     {
00041     }
00042 };
00043 
00044 
00046 class SOUTILS_EXPORT SoSlabRenderingElement : public SoReplacedElement
00047 {
00048    typedef SoReplacedElement inherited;
00049 
00050    SO_ELEMENT_HEADER(SoSlabRenderingElement);
00051 
00052    public:
00053 
00055       static  void set(SoState *state, SoNode *node, const SbSlabRenderingProperties &props);
00057       static  const SbSlabRenderingProperties &get(SoState *state);
00058 
00059    SoINTERNAL public:
00060 
00062       static void initClass();
00063 
00064    protected:
00065 
00066       SbSlabRenderingProperties _props;
00067 
00069       virtual ~SoSlabRenderingElement();
00070 };
00071 
00072 #endif  // _SO_ML_IMAGE_ELEMENT_