Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00049 #ifndef __vtkInteractorStyleImage_h
00050 #define __vtkInteractorStyleImage_h
00051 
00052 #include "vtkInteractorStyleTrackballCamera.h"
00053 
00054 // Motion flags
00055 
00056 #define VTKIS_WINDOW_LEVEL 1024
00057 #define VTKIS_PICK         1025
00058 
00059 class VTK_RENDERING_EXPORT vtkInteractorStyleImage : public vtkInteractorStyleTrackballCamera
00060 {
00061 public:
00062   static vtkInteractorStyleImage *New();
00063   vtkTypeRevisionMacro(vtkInteractorStyleImage, vtkInteractorStyleTrackballCamera);
00064   void PrintSelf(ostream& os, vtkIndent indent);
00065 
00067 
00068   vtkGetVector2Macro(WindowLevelStartPosition,int);
00069   vtkGetVector2Macro(WindowLevelCurrentPosition,int);
00071   
00073 
00075   virtual void OnMouseMove();
00076   virtual void OnLeftButtonDown();
00077   virtual void OnLeftButtonUp();
00078   virtual void OnRightButtonDown();
00079   virtual void OnRightButtonUp();
00081 
00083   virtual void OnChar();
00084 
00085   // These methods for the different interactions in different modes
00086   // are overridden in subclasses to perform the correct motion. Since
00087   // they might be called from OnTimer, they do not have mouse coord parameters
00088   // (use interactor's GetEventPosition and GetLastEventPosition)
00089   virtual void WindowLevel();
00090   virtual void Pick();
00091   
00092   // Interaction mode entry points used internally.  
00093   virtual void StartWindowLevel();
00094   virtual void EndWindowLevel();
00095   virtual void StartPick();
00096   virtual void EndPick();
00097 
00098 protected:
00099   vtkInteractorStyleImage();
00100   ~vtkInteractorStyleImage();
00101 
00102   int WindowLevelStartPosition[2];
00103   int WindowLevelCurrentPosition[2];
00104  
00105 private:
00106   vtkInteractorStyleImage(const vtkInteractorStyleImage&);  // Not implemented.
00107   void operator=(const vtkInteractorStyleImage&);  // Not implemented.
00108 };
00109 
00110 #endif

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530