00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00071 #ifndef __vtkGeoCamera_h
00072 #define __vtkGeoCamera_h
00073
00074 #include "vtkObject.h"
00075 #include "vtkSmartPointer.h"
00076
00077 class vtkCamera;
00078 class vtkGeoTerrainNode;
00079 class vtkTransform;
00080
00081 class VTK_GEOVIS_EXPORT vtkGeoCamera : public vtkObject
00082 {
00083 public:
00084 static vtkGeoCamera *New();
00085 vtkTypeMacro(vtkGeoCamera, vtkObject);
00086 void PrintSelf(ostream& os, vtkIndent indent);
00087
00089
00090 vtkGetVector3Macro(Position, double);
00092
00094
00096 void SetLongitude(double longitude);
00097 vtkGetMacro(Longitude,double);
00099
00101
00103 void SetLatitude(double latitude);
00104 vtkGetMacro(Latitude,double);
00106
00108
00111 void SetDistance(double Distance);
00112 vtkGetMacro(Distance,double);
00114
00116
00120 void SetHeading(double heading);
00121 vtkGetMacro(Heading,double);
00123
00125
00127 void SetTilt(double tilt);
00128 vtkGetMacro(Tilt,double);
00130
00133 vtkCamera* GetVTKCamera();
00134
00138 void InitializeNodeAnalysis(int rendererSize[2]);
00139
00142 double GetNodeCoverage(vtkGeoTerrainNode* node);
00143
00145
00147 vtkGetMacro(LockHeading, bool);
00148 vtkSetMacro(LockHeading, bool);
00149 vtkBooleanMacro(LockHeading, bool);
00151
00153
00154 void SetOriginLatitude(double oLat);
00155 vtkGetMacro(OriginLatitude, double);
00156 void SetOriginLongitude(double oLat);
00157 vtkGetMacro(OriginLongitude, double);
00159
00161
00163 vtkGetVector3Macro(Origin, double);
00164 void SetOrigin( double ox, double oy, double oz ) {
00165 this->Origin[0] = ox; this->Origin[1] = oy; this->Origin[2] = oz;
00166 this->UpdateVTKCamera();
00167 }
00169
00170 protected:
00171 vtkGeoCamera();
00172 ~vtkGeoCamera();
00173
00174 void UpdateVTKCamera();
00175 void UpdateAngleRanges();
00176
00177
00178 vtkSmartPointer<vtkCamera> VTKCamera;
00179 vtkSmartPointer<vtkTransform> Transform;
00180
00181
00182
00183 double OriginLatitude;
00184 double OriginLongitude;
00185 double Origin[3];
00186 void ComputeRectilinearOrigin();
00187
00188 double Longitude;
00189 double Latitude;
00190 double Distance;
00191 double Heading;
00192 double Tilt;
00193 bool LockHeading;
00194
00195
00196
00197 double ForwardNormal[3];
00198 double RightNormal[3];
00199 double UpNormal[3];
00200 double Aspect[2];
00201
00202
00203 double LeftPlaneNormal[3];
00204 double RightPlaneNormal[3];
00205 double DownPlaneNormal[3];
00206 double UpPlaneNormal[3];
00207
00208 double Position[3];
00209
00210 private:
00211 vtkGeoCamera(const vtkGeoCamera&);
00212 void operator=(const vtkGeoCamera&);
00213 };
00214
00215 #endif