VTK
dox/Interaction/Style/vtkInteractorStyleTerrain.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInteractorStyleTerrain.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 =========================================================================*/
00054 #ifndef __vtkInteractorStyleTerrain_h
00055 #define __vtkInteractorStyleTerrain_h
00056 
00057 #include "vtkInteractionStyleModule.h" // For export macro
00058 #include "vtkInteractorStyle.h"
00059 
00060 class vtkPolyDataMapper;
00061 class vtkSphereSource;
00062 class vtkExtractEdges;
00063 
00064 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle
00065 {
00066 public:
00068   static vtkInteractorStyleTerrain *New();
00069 
00070   vtkTypeMacro(vtkInteractorStyleTerrain,vtkInteractorStyle);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00074 
00076   virtual void OnMouseMove();
00077   virtual void OnLeftButtonDown();
00078   virtual void OnLeftButtonUp();
00079   virtual void OnMiddleButtonDown();
00080   virtual void OnMiddleButtonUp();
00081   virtual void OnRightButtonDown();
00082   virtual void OnRightButtonUp();
00084 
00086   virtual void OnChar();
00087 
00088   // These methods for the different interactions in different modes
00089   // are overridden in subclasses to perform the correct motion.
00090   virtual void Rotate();
00091   virtual void Pan();
00092   virtual void Dolly();
00093 
00095 
00096   vtkSetMacro(LatLongLines,int);
00097   vtkGetMacro(LatLongLines,int);
00098   vtkBooleanMacro(LatLongLines,int);
00100 
00101 protected:
00102   vtkInteractorStyleTerrain();
00103   ~vtkInteractorStyleTerrain();
00104 
00105   // Internal helper attributes
00106   int LatLongLines;
00107 
00108   vtkSphereSource *LatLongSphere;
00109   vtkPolyDataMapper *LatLongMapper;
00110   vtkActor *LatLongActor;
00111   vtkExtractEdges *LatLongExtractEdges;
00112 
00113   void SelectRepresentation();
00114   void CreateLatLong();
00115 
00116   double MotionFactor;
00117 
00118 private:
00119   vtkInteractorStyleTerrain(const vtkInteractorStyleTerrain&);  // Not implemented.
00120   void operator=(const vtkInteractorStyleTerrain&);  // Not implemented.
00121 
00122 };
00123 
00124 #endif
00125