![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: mtFltDatabase.h,v $ $Revision: 1.14 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef mtFltDatabase_H_ 00010 #define mtFltDatabase_H_ 00011 00012 // 00013 // \file mtFltDatabase.h 00014 // \brief Represents an abstraction of a Database node inside a Metaflight file. 00015 // 00016 00017 #include "mtflt/mtfltDefines.h" 00018 #include "mtflt/mtFltNode.h" 00019 #include <vlutil/vlFilename.h> 00020 #include <vlutil/vlConfig.h> 00021 #include <vector> 00022 #include <libxml/xmlreader.h> 00023 00024 class DtMtFltGeomGridDs; 00025 class DtMtFltGridStructure; 00026 class DtTerrainDatabase; 00027 class Coordinate_System; 00028 00029 // \brief Represents an abstraction of a Database node inside a Metaflight file. 00030 // This class is the top level container for a MetaFlight file. The database 00031 // object is a root container object that contains the coordinate system and dataset 00032 // information that describe the geometry used to build the run-time scene graph. 00033 class DT_DLL_mtflt DtMtFltDatabase : public DtMtFltNode 00034 { 00035 public: 00036 00037 // Default constructor. 00038 DtMtFltDatabase(); 00039 00040 // Destructor 00041 virtual ~DtMtFltDatabase(); 00042 00043 // Copy constructor 00044 DtMtFltDatabase(const DtMtFltDatabase& node); 00045 00046 // Assignment operator 00047 DtMtFltDatabase& operator=(const DtMtFltDatabase& orig); 00048 00049 // Overrides the \p DtMtFltNode::readNode method to read the 00050 // node information from a Metaflight Database node. 00051 // \param root pointer to the root node of the document 00052 // \param node pointer to the xml node that will be read 00053 // \return \b true if success reading the node. \b false otherwise. 00054 virtual bool readNode(const xmlNodePtr root, xmlNodePtr node); 00055 00056 // Loads the metaflight file into a terrain database. 00057 // \param mftFilename Name of the metaflight file to load 00058 // \param terrain returned terrain 00059 // \return \b true if success loading the Metaflight file into the 00060 // terrain object, \b false otherwise. 00061 virtual bool load(const DtFilename& mftFilename, DtTerrainDatabase*& terrain); 00062 00063 // Returns only the coordinate system that would define this database. Should not load 00064 // any polygonal or vector information 00065 virtual Coordinate_System* coordinateSystem(const DtFilename& filename); 00066 00067 protected: 00068 00069 unsigned int myVersionMajor; 00070 unsigned int myVersionMinor; 00071 00072 // Vector of Grid Structures. This is a vector just to be consistent 00073 // with Vegaprime's definition(s) of its Database class. Right now, it is filled 00074 // up, but it is not being used since the GeometryGridDataset contains a copy of the 00075 // grid structure object it uses. 00076 std::vector<DtMtFltGridStructure* > myGridStructures; 00077 00078 // Vector of Geometry Grid Datasets. This is a vector just to be consistent 00079 // with Vegaprime's definition(s) of its Database class. This loader only handles 00080 // one GeometryGridDataset node per file which means this vector will have only 00081 // one entry. 00082 std::vector<DtMtFltGeomGridDs*> myGeomGridDs; 00083 00084 private: 00085 00086 00087 }; 00088 00089 #endif