MeVisLabToolboxReference
MeVisLab/Standard/Sources/Inventor/SoView2D/extensions/SoView2DVoxelValue.h
Go to the documentation of this file.
00001 #ifndef __SoView2DVoxelValue_H
00002 #define __SoView2DVoxelValue_H
00003 //----------------------------------------------------------------------------------
00004 // **InsertLicense** code
00005 //----------------------------------------------------------------------------------
00007 
00013 //----------------------------------------------------------------------------------
00014 
00015 #ifndef __SoView2DInteractionExtension_H
00016 #include "SoView2DInteractionExtension.h"
00017 #endif
00018 
00019 #include <XVEnterScope.h>
00020 #include <Inventor/fields/SoSFInt32.h>
00021 #include <Inventor/fields/SoSFVec3f.h>
00022 #include <Inventor/fields/SoSFString.h>
00023 #include <XVLeaveScope.h>
00024 
00026 class SOVIEW2D_API SoView2DVoxelValue : public SoView2DInteractionExtension
00027 {
00028   SO_NODE_HEADER(SoView2DVoxelValue);
00029 
00030 public:
00031 
00033   SoSFVec3f voxelPosition;
00035   SoSFVec3f worldPosition;
00037   SoSFVec3f integerPosition;
00038 
00040   SoSFFloat storedValue;
00042   SoSFFloat outputValue;
00043 
00045   SoSFInt32  maxPrecision;
00046   SoSFString storedValueString;
00047   SoSFString outputValueString;
00049 
00051   static  void   initClass();
00052 
00054   SoView2DVoxelValue();
00055 
00057   bool   evalEvent(SoView2D* view2d, View2DSliceList* slicelist,
00058     View2DEvent* ec, View2DEventPhase phase);
00059 
00060 protected:
00062   void updateVoxelPosition(const SbVec3f& voxelPos, SoView2D* view2d, View2DSliceList* slicelist);
00063 
00065 
00066   virtual void startPressAt(const SoPointerPosition& pos);
00067   virtual void dragMoveTo(const SoPointerPosition& pos);
00069 
00071   virtual void pointerPosition(const SoPointerPosition& pos);
00072 
00073 private:
00075   int _timePoint;
00076 };
00077 
00078 #endif