VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
metaFlightDatabase.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: mtFltDatabase.h,v $ $Revision: 1.14 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef metaFlightDatabase_H_
10 #define metaFlightDatabase_H_
11 
12 //
13 // \file mtFltDatabase.h
14 // \brief Represents an abstraction of a Database node inside a Metaflight file.
15 //
16 
17 #include "mtflt/mtfltDefines.h"
18 #include "mtflt/metaFlightNode.h"
19 #include <vlutil/vlFilename.h>
20 #include <vlutil/vlConfig.h>
21 #include <vector>
22 #include <libxml/xmlreader.h>
23 
26 class DtTerrainDatabase;
27 class Coordinate_System;
28 
29 // \brief Represents an abstraction of a Database node inside a Metaflight file.
30 // This class is the top level container for a MetaFlight file. The database
31 // object is a root container object that contains the coordinate system and dataset
32 // information that describe the geometry used to build the run-time scene graph.
34 {
35 public:
36 
37  // Default constructor.
39 
40  // Destructor
41  virtual ~DtMetaFlightDatabase();
42 
43  // Copy constructor
45 
46  // Assignment operator
48 
49  // Overrides the \p DtMetaFlightNode::readNode method to read the
50  // node information from a Metaflight Database node.
51  // \param root pointer to the root node of the document
52  // \param node pointer to the xml node that will be read
53  // \return \b true if success reading the node. \b false otherwise.
54  virtual bool readNode(const xmlNodePtr root, xmlNodePtr node);
55 
56  // Loads the metaflight file into a terrain database.
57  // \param mftFilename Name of the metaflight file to load
58  // \param terrain returned terrain
59  // \return \b true if success loading the Metaflight file into the
60  // terrain object, \b false otherwise.
61  virtual bool load(const DtFilename& mftFilename, DtTerrainDatabase*& terrain);
62 
63  // Returns only the coordinate system that would define this database. Should not load
64  // any polygonal or vector information
65  virtual Coordinate_System* coordinateSystem(const DtFilename& filename);
66 
67 protected:
68 
69  unsigned int myVersionMajor;
70  unsigned int myVersionMinor;
71 
72  // Vector of Grid Structures. This is a vector just to be consistent
73  // with Vegaprime's definition(s) of its Database class. Right now, it is filled
74  // up, but it is not being used since the GeometryGridDataset contains a copy of the
75  // grid structure object it uses.
76  std::vector<DtMetaFlightGridStructure* > myGridStructures;
77 
78  // Vector of Geometry Grid Datasets. This is a vector just to be consistent
79  // with Vegaprime's definition(s) of its Database class. This loader only handles
80  // one GeometryGridDataset node per file which means this vector will have only
81  // one entry.
82  std::vector<DtMetaFlightGeomGridDs*> myGeomGridDs;
83 
84 private:
85 
86 
87 };
88 
89 #endif

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)