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

Rendering/vtkInteractorStyleImage.h

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