VTK
dox/Interaction/Style/vtkParallelCoordinatesInteractorStyle.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkParallelCoordinatesInteractorStyle.h
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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2009 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00048 #ifndef __vtkParallelCoordinatesInteractorStyle_h
00049 #define __vtkParallelCoordinatesInteractorStyle_h
00050 
00051 #include "vtkInteractionStyleModule.h" // For export macro
00052 #include "vtkInteractorStyleTrackballCamera.h"
00053 
00054 class vtkViewport;
00055 
00056 class VTKINTERACTIONSTYLE_EXPORT vtkParallelCoordinatesInteractorStyle : public vtkInteractorStyleTrackballCamera
00057 {
00058 public:
00059   static vtkParallelCoordinatesInteractorStyle *New();
00060   vtkTypeMacro(vtkParallelCoordinatesInteractorStyle, vtkInteractorStyleTrackballCamera);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00063   //BTX
00064   enum {
00065     INTERACT_HOVER=0,
00066     INTERACT_INSPECT,
00067     INTERACT_ZOOM,
00068     INTERACT_PAN
00069   };
00070   //ETX
00071 
00073 
00074   vtkGetVector2Macro(CursorStartPosition,int);
00075   vtkGetVector2Macro(CursorCurrentPosition,int);
00076   vtkGetVector2Macro(CursorLastPosition,int);
00078 
00080 
00081   void GetCursorStartPosition(vtkViewport *viewport, double pos[2]);
00082   void GetCursorCurrentPosition(vtkViewport *viewport, double pos[2]);
00083   void GetCursorLastPosition(vtkViewport *viewport, double pos[2]);
00085 
00087 
00089   virtual void OnMouseMove();
00090   virtual void OnLeftButtonDown();
00091   virtual void OnLeftButtonUp();
00092   virtual void OnMiddleButtonDown();
00093   virtual void OnMiddleButtonUp();
00094   virtual void OnRightButtonDown();
00095   virtual void OnRightButtonUp();
00096   virtual void OnLeave();
00098 
00099   virtual void StartInspect(int x, int y);
00100   virtual void Inspect(int x, int y);
00101   virtual void EndInspect();
00102 
00103   virtual void StartZoom();
00104   virtual void Zoom();
00105   virtual void EndZoom();
00106 
00107   virtual void StartPan();
00108   virtual void Pan();
00109   virtual void EndPan();
00110 
00112 
00113   virtual void OnChar();
00114 protected:
00115   vtkParallelCoordinatesInteractorStyle();
00116   ~vtkParallelCoordinatesInteractorStyle();
00118 
00119   int CursorStartPosition[2];
00120   int CursorCurrentPosition[2];
00121   int CursorLastPosition[2];
00122 
00123 private:
00124   vtkParallelCoordinatesInteractorStyle(const vtkParallelCoordinatesInteractorStyle&);  // Not implemented.
00125   void operator=(const vtkParallelCoordinatesInteractorStyle&);  // Not implemented.
00126 };
00127 
00128 #endif