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-------------------------------------------------------------------------*/
72#ifndef vtkGeoCamera_h
73#define vtkGeoCamera_h
74
75#include "vtkGeovisCoreModule.h" // For export macro
76#include "vtkObject.h"
77#include "vtkSmartPointer.h" // for SP
78
79class vtkCamera;
81class vtkTransform;
82
83class VTKGEOVISCORE_EXPORT vtkGeoCamera : public vtkObject
84{
85public:
86 static vtkGeoCamera *New();
87 vtkTypeMacro(vtkGeoCamera, vtkObject);
88 void PrintSelf(ostream& os, vtkIndent indent);
89
91
94 vtkGetVector3Macro(Position, double);
96
98
103 void SetLongitude(double longitude);
104 vtkGetMacro(Longitude,double);
106
108
113 void SetLatitude(double latitude);
114 vtkGetMacro(Latitude,double);
116
118
124 void SetDistance(double Distance);
125 vtkGetMacro(Distance,double);
127
129
138 void SetHeading(double heading);
139 vtkGetMacro(Heading,double);
141
143
149 void SetTilt(double tilt);
150 vtkGetMacro(Tilt,double);
152
158
164 void InitializeNodeAnalysis(int rendererSize[2]);
165
171
173
178 vtkGetMacro(LockHeading, bool);
179 vtkSetMacro(LockHeading, bool);
180 vtkBooleanMacro(LockHeading, bool);
182
184
187 void SetOriginLatitude(double oLat);
188 vtkGetMacro(OriginLatitude, double);
189 void SetOriginLongitude(double oLat);
190 vtkGetMacro(OriginLongitude, double);
192
194
198 vtkGetVector3Macro(Origin, double);
199 void SetOrigin( double ox, double oy, double oz ) {
200 this->Origin[0] = ox; this->Origin[1] = oy; this->Origin[2] = oz;
201 this->UpdateVTKCamera();
202 }
204
205protected:
208
211
214
215 // This point is shifted to 0,0,0 to avoid openGL issues.
218 double Origin[3];
220
221 double Longitude;
222 double Latitude;
223 double Distance;
224 double Heading;
225 double Tilt;
227
228 // Values precomputed to make updating terrain mode efficient.
229 // The vislibility of many terrain nodes is analyzed every render.
230 double ForwardNormal[3];
231 double RightNormal[3];
232 double UpNormal[3];
233 double Aspect[2];
234
235 // Frustum planes is better than other options for culling spheres.
236 double LeftPlaneNormal[3];
237 double RightPlaneNormal[3];
238 double DownPlaneNormal[3];
239 double UpPlaneNormal[3];
240
241 double Position[3];
242
243private:
244 vtkGeoCamera(const vtkGeoCamera&) VTK_DELETE_FUNCTION;
245 void operator=(const vtkGeoCamera&) VTK_DELETE_FUNCTION;
246};
247
248#endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
Geo interface to a camera.
Definition: vtkGeoCamera.h:84
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetLongitude(double longitude)
Longitude is in degrees: (-180->180) Relative to absolute coordinates.
void SetHeading(double heading)
Heading is in degrees: (-180->180) Relative to Logitude and Latitude.
void UpdateVTKCamera()
void ComputeRectilinearOrigin()
double Longitude
Definition: vtkGeoCamera.h:221
static vtkGeoCamera * New()
double OriginLatitude
Definition: vtkGeoCamera.h:216
double OriginLongitude
Definition: vtkGeoCamera.h:217
void SetOrigin(double ox, double oy, double oz)
Definition: vtkGeoCamera.h:199
void SetOriginLatitude(double oLat)
This point is shifted to 0,0,0 to avoid openGL issues.
void UpdateAngleRanges()
void SetTilt(double tilt)
Tilt is also know as pitch.
void SetLatitude(double latitude)
Latitude is in degrees: (-90->90) Relative to Longitude.
double Heading
Definition: vtkGeoCamera.h:224
void InitializeNodeAnalysis(int rendererSize[2])
We precompute some values to speed up update of the terrain.
vtkCamera * GetVTKCamera()
This vtk camera is updated to match this geo cameras state.
void SetOriginLongitude(double oLat)
double Latitude
Definition: vtkGeoCamera.h:222
vtkSmartPointer< vtkCamera > VTKCamera
Definition: vtkGeoCamera.h:212
double GetNodeCoverage(vtkGeoTerrainNode *node)
This method estimates how much of the view is covered by the sphere.
vtkSmartPointer< vtkTransform > Transform
Definition: vtkGeoCamera.h:213
void SetDistance(double Distance)
Distance is in Meters Relative to Longitude and Latitude.
double Distance
Definition: vtkGeoCamera.h:223
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:61
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.