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

vtkInteractorStyleTerrain.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInteractorStyleTerrain.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 =========================================================================*/
00065 #ifndef __vtkInteractorStyleTerrain_h
00066 #define __vtkInteractorStyleTerrain_h
00067 
00068 #include "vtkInteractorStyle.h"
00069 
00070 class vtkPolyDataMapper;
00071 class vtkSphereSource;
00072 class vtkExtractEdges;
00073 
00074 class VTK_RENDERING_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle
00075 {
00076 public:
00078   static vtkInteractorStyleTerrain *New();
00079 
00080   vtkTypeRevisionMacro(vtkInteractorStyleTerrain,vtkInteractorStyle);
00081   void PrintSelf(ostream& os, vtkIndent indent);
00082 
00084 
00086   virtual void OnMouseMove();
00087   virtual void OnLeftButtonDown();
00088   virtual void OnLeftButtonUp();
00089   virtual void OnMiddleButtonDown();
00090   virtual void OnMiddleButtonUp();
00091   virtual void OnRightButtonDown();
00092   virtual void OnRightButtonUp();
00094 
00096   virtual void OnChar();
00097 
00098   // These methods for the different interactions in different modes
00099   // are overridden in subclasses to perform the correct motion.
00100   virtual void Rotate();
00101   virtual void Pan();
00102   virtual void Dolly();
00103 
00105 
00106   vtkSetMacro(LatLongLines,int);
00107   vtkGetMacro(LatLongLines,int);
00108   vtkBooleanMacro(LatLongLines,int);
00110 
00111 protected:
00112   vtkInteractorStyleTerrain();
00113   ~vtkInteractorStyleTerrain();
00114 
00115   // Internal helper attributes
00116   int LatLongLines;
00117 
00118   vtkSphereSource *LatLongSphere;
00119   vtkPolyDataMapper *LatLongMapper;
00120   vtkActor *LatLongActor;
00121   vtkExtractEdges *LatLongExtractEdges;
00122 
00123   void SelectRepresentation();
00124   void CreateLatLong();
00125   
00126   double MotionFactor;
00127 
00128 private:
00129   vtkInteractorStyleTerrain(const vtkInteractorStyleTerrain&);  // Not implemented.
00130   void operator=(const vtkInteractorStyleTerrain&);  // Not implemented.
00131   
00132 };
00133 
00134 #endif
00135