VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
mtflt
mtFltDatabase.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 mtFltDatabase_H_
10
#define mtFltDatabase_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/mtFltNode.h
"
19
#include <vlutil/vlFilename.h>
20
#include <vlutil/vlConfig.h>
21
#include <vector>
22
#include <libxml/xmlreader.h>
23
24
class
DtMtFltGeomGridDs
;
25
class
DtMtFltGridStructure
;
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.
33
class
DT_DLL_mtflt
DtMtFltDatabase
:
public
DtMtFltNode
34
{
35
public
:
36
37
// Default constructor.
38
DtMtFltDatabase
();
39
40
// Destructor
41
virtual
~
DtMtFltDatabase
();
42
43
// Copy constructor
44
DtMtFltDatabase
(
const
DtMtFltDatabase
& node);
45
46
// Assignment operator
47
DtMtFltDatabase
&
operator=
(
const
DtMtFltDatabase
& orig);
48
49
// Overrides the \p DtMtFltNode::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<DtMtFltGridStructure* >
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<DtMtFltGeomGridDs*>
myGeomGridDs
;
83
84
private
:
85
86
87
};
88
89
#endif
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)