MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoView2D/extensions/SoView2DSlicer.h
Go to the documentation of this file.
00001 #ifndef __SoView2DSlicer_H
00002 #define __SoView2DSlicer_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00007 
00013 //----------------------------------------------------------------------------------
00014 
00015 #ifndef __SoView2DInteractionExtension_H
00016 #include "SoView2DInteractionExtension.h"
00017 #endif
00018 
00020 class SOVIEW2D_API SoView2DSlicer : public SoView2DInteractionExtension {
00021 
00022   SO_NODE_HEADER(SoView2DSlicer);
00023 
00024 public:
00026   SoSFFloat sensitivity;
00027 
00029   static void   initClass();
00030 
00032   SoView2DSlicer();
00033 
00035   SoSFBool permitInteractionOutsideImage;
00036 
00038   void   updateValues();
00039 
00041   bool   evalEvent(SoView2D* view2d, View2DSliceList* slicelist,
00042     View2DEvent* ec, View2DEventPhase phase);
00043 
00044 protected:
00045   void doSliceByMouse(float diffY, SoView2D* view2d);
00046 
00048 
00049   virtual void startPressAt(const SoPointerPosition& pos);
00050   virtual void dragMoveTo(const SoPointerPosition& pos);
00051   virtual SoPointingAction* endPress(int clickCount);
00053 
00055   int    _oldY;
00057   int    _sumY;
00059   unsigned _prevWheelCode;
00061   int    _sumWheel;
00062 };
00063 
00064 #endif