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 =========================================================================*/ 00054 #ifndef __vtkInteractorStyleTerrain_h 00055 #define __vtkInteractorStyleTerrain_h 00056 00057 #include "vtkInteractorStyle.h" 00058 00059 class vtkPolyDataMapper; 00060 class vtkSphereSource; 00061 class vtkExtractEdges; 00062 00063 class VTK_RENDERING_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle 00064 { 00065 public: 00067 static vtkInteractorStyleTerrain *New(); 00068 00069 vtkTypeRevisionMacro(vtkInteractorStyleTerrain,vtkInteractorStyle); 00070 void PrintSelf(ostream& os, vtkIndent indent); 00071 00073 00075 virtual void OnMouseMove(); 00076 virtual void OnLeftButtonDown(); 00077 virtual void OnLeftButtonUp(); 00078 virtual void OnMiddleButtonDown(); 00079 virtual void OnMiddleButtonUp(); 00080 virtual void OnRightButtonDown(); 00081 virtual void OnRightButtonUp(); 00083 00085 virtual void OnChar(); 00086 00087 // These methods for the different interactions in different modes 00088 // are overridden in subclasses to perform the correct motion. 00089 virtual void Rotate(); 00090 virtual void Pan(); 00091 virtual void Dolly(); 00092 00094 00095 vtkSetMacro(LatLongLines,int); 00096 vtkGetMacro(LatLongLines,int); 00097 vtkBooleanMacro(LatLongLines,int); 00099 00100 protected: 00101 vtkInteractorStyleTerrain(); 00102 ~vtkInteractorStyleTerrain(); 00103 00104 // Internal helper attributes 00105 int LatLongLines; 00106 00107 vtkSphereSource *LatLongSphere; 00108 vtkPolyDataMapper *LatLongMapper; 00109 vtkActor *LatLongActor; 00110 vtkExtractEdges *LatLongExtractEdges; 00111 00112 void SelectRepresentation(); 00113 void CreateLatLong(); 00114 00115 double MotionFactor; 00116 00117 private: 00118 vtkInteractorStyleTerrain(const vtkInteractorStyleTerrain&); // Not implemented. 00119 void operator=(const vtkInteractorStyleTerrain&); // Not implemented. 00120 00121 }; 00122 00123 #endif 00124