![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: fltTerrainInit.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef fltTerrainInit_H_ 00009 #define fltTerrainInit_H_ 00010 00011 #include "flt/fltDefines.h" 00012 #include <matrix/mapDatum.h> 00013 #include "geometry/point.h" 00014 #include "gdb/terrainFileInitializer.h" 00015 #include "gdb/terrainDatabaseToolConfiguration.h" 00016 00017 // class DtFlightTerrainInitializer: has the parameters to create 00018 // a gdb based off of flight files. Namely it holds the reference Ellipsoid 00019 // and datum shift to create the map datum for the coordinate system, 00020 // as well as external reference and LOD parameters. 00021 class DT_DLL_flt DtFlightTerrainInitializer : public DtTerrainFileInitializer 00022 { 00023 00024 public: 00025 00026 DtFlightTerrainInitializer(); 00027 00028 virtual ~DtFlightTerrainInitializer(); 00029 00030 // copy constructor 00031 DtFlightTerrainInitializer(const DtFlightTerrainInitializer& orig); 00032 00033 // assignment operator 00034 DtFlightTerrainInitializer& operator=(const DtFlightTerrainInitializer& orig); 00035 00036 virtual DtString type() const; 00037 00038 // set/get Semi-Major axis for ellipsoid 00039 virtual void setMajorAxis(double major); 00040 virtual const double majorAxis() const; 00041 00042 // set/get Semi-Minor axis for ellipsoid 00043 virtual void setMinorAxis(double minor); 00044 virtual const double minorAxis() const; 00045 00046 // Sets from major/minor and shifts. If resetToCurrent is true, 00047 // uses DtCurrentMapDatum() 00048 virtual const DtMapDatum mapDatum() const; 00049 00050 // set/get datum shift 00051 virtual void setDatumShift(const DtPoint & shift); 00052 virtual const DtPoint datumShift() const; 00053 00054 // The following is only relevant for projected coordinate systems: 00055 00056 // set/get the projection's central scale 00057 virtual void setProjectionScale(double scale); 00058 virtual const double projectionScale() const; 00059 00060 // Get/set the number of levels to keep as external files 00061 // For instance, if this is set to 0, then the entire flight file will be 00062 // read into a single gdb, with no referenced pieces maintained as external 00063 // references. 00064 virtual void setNumberOfExternalLevelsToKeep(unsigned int numLevels); 00065 virtual const unsigned int numberOfExternalLevelsToKeep() const; 00066 00067 virtual void setLodDistance(double newLodDistance); 00068 virtual const double lodDistance() const; 00069 00070 virtual void setLowLodDistance(double distance); 00071 virtual const double lowLodDistance() const; 00072 00073 // If inverse flattening is non-zero, when the minor axis is requested, 00074 // even if it has been defined in the map file, it will still be defined 00075 // in terms of the inverse flattening (i.e. inverse flattening takes 00076 // precedence) 00077 virtual void setInverseFlattening(double); 00078 virtual const double inverseFlattening() const; 00079 00080 // If switch nodes are present in the flt file, only load from the 00081 // supplied path. 00082 virtual void setFlightPath(const DtString&); 00083 virtual const DtString flightPath() const; 00084 00085 virtual void setDefaultSwitchNodeChildIndex(unsigned int index); 00086 virtual unsigned int defaultSwitchNodeChildIndex() const; 00087 00088 virtual DtTerrainDatabaseToolConfiguration terrainDbConfig() const; 00089 virtual void setTerrainDbConfig(const DtTerrainDatabaseToolConfiguration& newTerrainDbConfig); 00090 00091 protected: 00092 00093 mutable DtMapDatum myMapDatum; 00094 double myProjectionCentralScale; 00095 00096 // The number levels of external nodes to keep as DtFileNodes (default = 0). 00097 // Note: if this is > 0, loading them will also cause them to save as gdb 00098 // files. 00099 unsigned int myNumberOfExternalLevelsToKeep; 00100 00101 double myLodDistance; 00102 00103 // The low level of detail that is used to generate alternate 00104 // representations for DtFileNodes (<0 to disable). 00105 double myLowLodDistance; 00106 00107 double myInverseFlattening; 00108 bool mySetMapDatumFromCurrent; 00109 DtString myFlightPath; 00110 00111 unsigned int myDefaultSwitchNodeChildIndex; 00112 00114 // Processing parameters 00115 // 00116 // These only apply when "keeping external levels" as described above. 00117 // These are the parameters that indicate the processing that needs to 00118 // happen to the external files before they are written out as "gdb" files. 00119 // 00120 // Since this kind of processing is done using a DtTerrainDatabaseTool, 00121 // that's what we have a processing config file for. 00122 DtTerrainDatabaseToolConfiguration myTerrainDbToolConfig; 00123 }; 00124 00125 #endif