VTK
vtkGeoCamera.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoCamera.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
71 #ifndef vtkGeoCamera_h
72 #define vtkGeoCamera_h
73 
74 #include "vtkGeovisCoreModule.h" // For export macro
75 #include "vtkObject.h"
76 #include "vtkSmartPointer.h" // for SP
77 
78 class vtkCamera;
79 class vtkGeoTerrainNode;
80 class vtkTransform;
81 
83 {
84 public:
85  static vtkGeoCamera *New();
86  vtkTypeMacro(vtkGeoCamera, vtkObject);
87  void PrintSelf(ostream& os, vtkIndent indent);
88 
90 
91  vtkGetVector3Macro(Position, double);
93 
95 
97  void SetLongitude(double longitude);
98  vtkGetMacro(Longitude,double);
100 
102 
104  void SetLatitude(double latitude);
105  vtkGetMacro(Latitude,double);
107 
109 
112  void SetDistance(double Distance);
113  vtkGetMacro(Distance,double);
115 
117 
121  void SetHeading(double heading);
122  vtkGetMacro(Heading,double);
124 
126 
128  void SetTilt(double tilt);
129  vtkGetMacro(Tilt,double);
131 
134  vtkCamera* GetVTKCamera();
135 
139  void InitializeNodeAnalysis(int rendererSize[2]);
140 
143  double GetNodeCoverage(vtkGeoTerrainNode* node);
144 
146 
148  vtkGetMacro(LockHeading, bool);
149  vtkSetMacro(LockHeading, bool);
150  vtkBooleanMacro(LockHeading, bool);
152 
154 
155  void SetOriginLatitude(double oLat);
156  vtkGetMacro(OriginLatitude, double);
157  void SetOriginLongitude(double oLat);
158  vtkGetMacro(OriginLongitude, double);
160 
162 
164  vtkGetVector3Macro(Origin, double);
165  void SetOrigin( double ox, double oy, double oz ) {
166  this->Origin[0] = ox; this->Origin[1] = oy; this->Origin[2] = oz;
167  this->UpdateVTKCamera();
168  }
170 
171 protected:
172  vtkGeoCamera();
173  ~vtkGeoCamera();
174 
175  void UpdateVTKCamera();
176  void UpdateAngleRanges();
177 
178 //BTX
181 //ETX
182 
183  // This point is shifted to 0,0,0 to avoid openGL issues.
186  double Origin[3];
187  void ComputeRectilinearOrigin();
188 
189  double Longitude;
190  double Latitude;
191  double Distance;
192  double Heading;
193  double Tilt;
195 
196  // Values precomputed to make updating terrain mode efficient.
197  // The vislibility of many terrain nodes is analyzed every render.
198  double ForwardNormal[3];
199  double RightNormal[3];
200  double UpNormal[3];
201  double Aspect[2];
202 
203  // Frustum planes is better than other options for culling spheres.
204  double LeftPlaneNormal[3];
205  double RightPlaneNormal[3];
206  double DownPlaneNormal[3];
207  double UpPlaneNormal[3];
208 
209  double Position[3];
210 
211 private:
212  vtkGeoCamera(const vtkGeoCamera&); // Not implemented.
213  void operator=(const vtkGeoCamera&); // Not implemented.
214 };
215 
216 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
double OriginLatitude
Definition: vtkGeoCamera.h:184
void SetOrigin(double ox, double oy, double oz)
Definition: vtkGeoCamera.h:165
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
double Latitude
Definition: vtkGeoCamera.h:190
vtkSmartPointer< vtkCamera > VTKCamera
Definition: vtkGeoCamera.h:179
double OriginLongitude
Definition: vtkGeoCamera.h:185
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
vtkSmartPointer< vtkTransform > Transform
Definition: vtkGeoCamera.h:180
double Distance
Definition: vtkGeoCamera.h:191
#define VTKGEOVISCORE_EXPORT
double Heading
Definition: vtkGeoCamera.h:192
double Longitude
Definition: vtkGeoCamera.h:189
static vtkObject * New()
Geo interface to a camera.
Definition: vtkGeoCamera.h:82