VR-Forces 4.0.4 Class Documentation
include/shape/shapeDb.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: shapeDb.h,v $ $Revision: 1.17 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef shapeDb_H_
00009 #define shapeDb_H_
00010 
00011 #include "shape/shapeDefines.h"
00012 #include "gdb/gdbTerrainReader.h"
00013 #include "geometry/point.h"
00014 #include <vlutil/vlUtil.h>
00015 #include <vlutil/vlConfig.h>
00016 #include <list>
00017 
00018 class DtMetafileRecord;
00019 class DtFilename;
00020 class DtSurfaceManager;
00021 class DtVectorNetwork;
00022 
00023 //class DtTerrainInitializer;
00024 class DtShapeInitializer;
00025 class DtShapeTerrainFile;
00026 
00027 //
00028 // Instances of DtShapeReader are responsible for importing polygonal shapefiles
00029 // into the GDB format..
00030 class DT_DLL_shape DtShapeReader : public DtTerrainReader
00031 {
00032 
00033 public:
00034 
00035    typedef std::list<DtShapeTerrainFile*> DtShapeTerrainFileContainer;
00036    typedef DtShapeTerrainFileContainer::iterator DtShapeTerrainFileIter;
00037    typedef DtShapeTerrainFileContainer::const_iterator DtShapeTerrainFileConstIter;
00038 
00039    // constructor
00040    DtShapeReader();
00041 
00042    // destructor
00043    virtual ~DtShapeReader();
00044 
00045    // Loads terrain database file named filename, returning the data in 
00046    // terrain.  The terrain pointer passed in must be initialized before calling 
00047    // loadTerrain.
00048    virtual bool loadTerrain(const DtFilename& filename, 
00049       DtTerrainDatabase* terrain);
00050 
00051    // Loads terrain database file named filename, returning the data in 
00052    // terrain.  The initializer object is used to pass in additional information
00053    // about the terrain to be loaded.  The terrain pointer passed in must be 
00054    // initialized before calling loadTerrain.
00055    virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain, 
00056       const DtTerrainInitializer* initializer);
00057 
00058    // Returns "shape"
00059    virtual const DtString dataType() const;
00060 
00061    virtual int surfaceIDByElevation(double z);
00062 
00063    virtual DtPoint &origin();
00064 
00065    static DtTerrainReader* create();
00066 
00067    // Returns only the coordinate system that would define this database.  Should not load
00068    // any polygonal or vector information
00069    virtual Coordinate_System* coordinateSystem(const DtFilename& filename);
00070 
00071    virtual int optionalFileFlags(const DtFilename& filename)
00072    {
00073       return 0;
00074    }
00075 
00076 protected:
00077    
00078    // copy constructor
00079    DtShapeReader(const DtShapeReader& orig);
00080 
00081    // assignment operator
00082    DtShapeReader& operator=(const DtShapeReader& orig);
00083 
00084    // Load a dted database (filename is the filename of a terrain metafile).
00085    // We need the path to this file in case the dted files specified in the
00086    // record are relative paths.
00087    virtual bool Load(const DtFilename& filename, const DtShapeInitializer* i);
00088 
00089    virtual bool importPolys();
00090    virtual bool importPostElevationData(const DtShapeInitializer* i);
00091 
00092    virtual void clean();
00093 
00094 protected:
00095 
00096    double               myThresholdForSeaLevel;
00097    
00098    double               myMaxHigh;
00099    double               myMinHigh;
00100    
00101    double               myLenHigh;
00102    
00103    DtShapeTerrainFileContainer myFileContainer;
00104 
00105    DtPoint              myOriginToSubstract;
00106 
00107    static const unsigned int theNumColorGradations;
00108 
00109 };
00110 
00111 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)