![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2006 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: shapeExporter.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 00010 #ifndef SHAPEEXPORTER_H 00011 #define SHAPEEXPORTER_H 00012 00013 #include <vlutil/vlString.h> 00014 #include "shape/shapeDefines.h" 00015 00016 class DtTerrainDatabase; 00017 00018 // \file shapeExporter.h 00019 // \brief Contains the DtShapeExporter class declaration and other related definitions/declarations. 00020 00021 // the DtShapeExporter calss is just a convenient container for the code that 00022 // writes a DtTerrainDatabase to a shape file. Currently it only writes the 00023 // polygons to a 3D shape file. 00024 class DT_DLL_shape DtShapeExporter 00025 { 00026 public: 00027 DtShapeExporter(); 00028 virtual ~DtShapeExporter(); 00029 00030 // writes four files using the filename prefix. the resulting shape file 00031 // includes all polygons that satisfy isGround and not isCulturalFeature 00032 // it calls writePrj() followed by writeShpShx() followed by writeDbf(). 00033 virtual void exportPolygons( const char* filename, DtTerrainDatabase* tdb); 00034 00035 protected: 00036 // write a projection file. The exporter does all of its work in geodetic 00037 // so this file is WGS84 GEOGCS with the units as DEGREES 00038 virtual void writePrj(); 00039 00040 // writes both the main shp file and the index file 00041 virtual void writeShpShx(); 00042 00043 // writes out a Dbf file for the attributes. currently only a ID attribute 00044 // is written. 00045 virtual void writeDbf(); 00046 00047 00048 protected: 00049 // these members are used as temporary storage during the output process. 00050 DtString myFilename; 00051 DtTerrainDatabase* myTdb; 00052 int myNumPolys; 00053 }; 00054 00055 #endif 00056