VR-Forces 4.0.4 Class Documentation
include/shape/shapeVectorReader.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: shapeVectorReader.h,v $ $Revision: 1.12 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef shapeVectorReader_H_
00009 #define shapeVectorReader_H_
00010 
00011 #include "shape/shapeDefines.h"
00012 #include "gdb/vectorDataReader.h"
00013 #include "geometry/point.h"
00014 #include <vlutil/vlUtil.h>
00015 
00016 class DtList;
00017 class DtMetafileRecord;
00018 class DtFilename;
00019 class DtSurfaceManager;
00020 class DtVectorNetwork;
00021 class DtSpecificationManager;
00022 class DtVectorDataInitializer;
00023 
00024 
00025 class DtShapeVectorInitializer;
00026 
00027 //
00028 // Instances of DtShapeVectorReader are a list of DtDtedCells.
00029 class DT_DLL_shape DtShapeVectorReader : public DtVectorDataReader
00030 {
00031 
00032 public:
00033    // constructor
00034    DtShapeVectorReader();
00035 
00036    // destructor
00037    virtual ~DtShapeVectorReader();
00038 
00039    // Conventional version, used by TDBTool and VR-Forces to load
00040    // vector network.
00041    virtual bool importVectorData(const DtFilename& path, 
00042                                  DtTerrainDatabase* terrain, 
00043                                  DtVectorDataInitializer* initializer);
00044 
00045    // Alternative version, to be used when loading vector data for
00046    // for 3D visualization.  Does not crop to terrain extents or 
00047    // planarize data.  Does create specification attributes for every
00048    // field available in the .dbf file.
00049    virtual bool importVectorData(const DtFilename& shapefile, 
00050                                  DtTerrainDatabase& terrain);
00051 
00052    // Returns "shape"
00053    virtual DtString dataType();
00054 
00055    virtual DtVectorNetwork* localVectorNetwork();
00056 
00057    virtual DtPoint &origin();
00058 
00059    static DtVectorDataReader* create();
00060 
00061    // Returns true if Shapefile (.shp) contains vector data.  Only the
00062    // following data types may be present in the file for this to be true:
00063    // Point
00064    // PolyLine
00065    // Polygon
00066    // Multipoint
00067    static bool isShapeVectorDataFile(const DtFilename& filename);
00068 
00069 protected:
00070    
00071    virtual bool importFeatures(DtVectorNetwork* vectorNetwork, 
00072                                const DtFilename& path, 
00073                                const DtShapeVectorInitializer* i);
00074 
00075 protected:
00076 
00077    DtPoint                 myOriginToSubstract;
00078    DtVectorNetwork*        myLocalNetwork; 
00079 
00080    static const unsigned int theNumColorGradations;
00081 
00082 };
00083 
00084 #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)