VR-Forces 4.0.4 Class Documentation
include/gdb/extentReader.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2005 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: extentReader.h,v $ $Revision: 1.5 $ $State: Exp $
00007 ******************************************************************************/
00008 #ifndef extentReader_H_
00009 #define extentReader_H_
00010 
00011 //
00012 // \file extentReader.h
00013 // \brief Contains the DtExtentReader class declaration.
00014 //
00015 
00016 #include "gdb/gdbDefines.h"
00017 #include "gdb/terrainReader.h"
00018 
00019 class DtExtentInitializer;
00020 class DtTerrainInitializer;
00021 class DtTerrainDatabase;
00022 class DtFilename;
00023 
00024 
00025 //
00026 // The DtExtentReader class is responsible for creating a simple terrain with
00027 // the coordinate system and extent specified in the initializer.  Note that
00028 // the default is to create a geodetic terrain with the maximum extents defined
00029 // for the initializer.
00030 class DT_DLL_gdb DtExtentReader : public DtTerrainReader
00031 {
00032 public:
00033    DtExtentReader();
00034 
00035    virtual ~DtExtentReader();
00036 
00037 private:
00038    // Copy constructor and Assignment operator not implemented. This class is
00039    // not copyable or assignable
00040    DtExtentReader(const DtExtentReader& original);
00041    const DtExtentReader& operator=(const DtExtentReader& original);
00042    
00043 public:
00044    // Loads terrain database file named filename, returning the data in 
00045    // terrain.  The terrain pointer passed in must be initialized before calling 
00046    // loadTerrain.
00047    virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain);
00048 
00049    // Loads terrain database file named filename, returning the data in 
00050    // terrain.  The initializer object is used to pass in additional information
00051    // about the terrain to be loaded.  The terrain pointer passed in must be 
00052    // initialized before calling loadTerrain.
00053    virtual bool loadTerrain(const DtFilename& filename, DtTerrainDatabase* terrain, 
00054       const DtTerrainInitializer* initializer);
00055 
00056    bool loadTerrain(DtTerrainDatabase& terrainDb, 
00057       const DtExtentInitializer& extentInitializer);
00058 
00059    bool createCoordinateSystem(DtTerrainDatabase& terrainDb, 
00060       const DtExtentInitializer& extentInitializer);
00061    
00062    // Creates two terrain triangles formed from the specified extent.  The 
00063    // altitude of the vertices is determined by the altitude of the left, back, 
00064    // bottom vertex and the right, front, upper vertex.  These are used as the 
00065    // SW and NE vertices respectively.  The altitude of the SE vertex matches 
00066    // the altitude of the SW vertex and the altitude of the NW vertex equals the
00067    // altitude of the NE vertex.
00068    // 
00069    // (NW) *----------* (NE)
00070    //      |\         |
00071    //      | \        |
00072    //      |  \       |
00073    //      |   \      |
00074    //      |    \     |
00075    //      |     \    |
00076    //      |      \   |
00077    //      |       \  |
00078    //      |        \ |
00079    //      |         \|
00080    // (SW) *----------* (SE)
00081    //
00082    bool createTerrain(DtTerrainDatabase& terrainDb, 
00083       const DtExtentInitializer& extentInitializer);
00084    
00085    // Returns "extent"
00086    virtual const DtString dataType() const;
00087 
00088    // Returns only the coordinate system that would define this database.  Should not load
00089    // any polygonal or vector information
00090    virtual Coordinate_System* coordinateSystem(const DtFilename& filename);
00091 
00092    static DtTerrainReader* create();
00093 
00094    virtual int optionalFileFlags(const DtFilename& filename)
00095    {
00096       return 0;
00097    }
00098 
00099 protected:
00100    bool testInvariant() const;
00101 
00102 private:
00103 };
00104 
00105 inline const DtString DtExtentReader::dataType() const
00106 {
00107    return "extent";
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)