Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkInteractorStyleImage.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleImage.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00061 #ifndef __vtkInteractorStyleImage_h
00062 #define __vtkInteractorStyleImage_h
00063 
00064 #include "vtkInteractorStyleTrackballCamera.h"
00065 
00066 // Motion flags
00067 
00068 #define VTKIS_WINDOW_LEVEL 1024
00069 #define VTKIS_PICK         1025
00070 
00071 class VTK_RENDERING_EXPORT vtkInteractorStyleImage : public vtkInteractorStyleTrackballCamera
00072 {
00073 public:
00074   static vtkInteractorStyleImage *New();
00075   vtkTypeRevisionMacro(vtkInteractorStyleImage, vtkInteractorStyleTrackballCamera);
00076   void PrintSelf(ostream& os, vtkIndent indent);
00077 
00079 
00080   vtkGetVector2Macro(WindowLevelStartPosition,int);
00081   vtkGetVector2Macro(WindowLevelCurrentPosition,int);
00083   
00085 
00087   virtual void OnMouseMove();
00088   virtual void OnLeftButtonDown();
00089   virtual void OnLeftButtonUp();
00090   virtual void OnRightButtonDown();
00091   virtual void OnRightButtonUp();
00093 
00095   virtual void OnChar();
00096 
00097   // These methods for the different interactions in different modes
00098   // are overridden in subclasses to perform the correct motion. Since
00099   // they might be called from OnTimer, they do not have mouse coord parameters
00100   // (use interactor's GetEventPosition and GetLastEventPosition)
00101   virtual void WindowLevel();
00102   virtual void Pick();
00103   
00104   // Interaction mode entry points used internally.  
00105   virtual void StartWindowLevel();
00106   virtual void EndWindowLevel();
00107   virtual void StartPick();
00108   virtual void EndPick();
00109 
00110 protected:
00111   vtkInteractorStyleImage();
00112   ~vtkInteractorStyleImage();
00113 
00114   int WindowLevelStartPosition[2];
00115   int WindowLevelCurrentPosition[2];
00116  
00117 private:
00118   vtkInteractorStyleImage(const vtkInteractorStyleImage&);  // Not implemented.
00119   void operator=(const vtkInteractorStyleImage&);  // Not implemented.
00120 };
00121 
00122 #endif