V-ART
xmlscene.h
Go to the documentation of this file.
1 
5 #ifndef VART_XML_H
6 #define VART_XML_H
7 
8 #include "vart/scene.h"
9 #include "vart/xmlbase.h"
10 #include <string>
11 #include <map>
12 
13 namespace VART {
14  class MeshObject;
15  class Dof;
16  typedef std::map<std::string, MeshObject*> meshObjMap;
17  typedef std::map<std::string, meshObjMap> meshMap;
18 
19  class XmlScene : public Scene, public XmlBase {
20  public:
21  XmlScene();
22  ~XmlScene();
24  bool LoadFromFile(const std::string& fileName);
26  bool LoadScene(const std::string& basePath);
28  SceneNode* LoadSceneNode(XERCES_CPP_NAMESPACE::DOMNode* sceneList, const std::string& basePath);
30  MeshObject* LoadMeshFromFile(std::string filen, std::string type, std::string meshName);
32  void loadDofs( XERCES_CPP_NAMESPACE::DOMNode* node, std::list<Dof*>* dofs);
33 
34  private:
35  meshObjMap mapMeshObj;
36  meshMap mapMesh;
37  }; // end class declaration
38 } // end namespace
39 
40 #endif
Base class for objects that compose a scene graph.
Definition: scenenode.h:25
MeshObject * LoadMeshFromFile(std::string filen, std::string type, std::string meshName)
Load MeshObjects from file.
Definition: xmlscene.cpp:95
Header file for V-ART class "XmlBase".
Basic methods for reading XML files.
Definition: xmlbase.h:18
bool LoadFromFile(const std::string &fileName)
Parses the xml file. If it doesn't have errors, load scene.
Definition: xmlscene.cpp:27
Header file for V-ART class "Scene".
std::map< std::string, MeshObject * > meshObjMap
Definition: xmlscene.h:15
A set of objects, lights and cameras.
Definition: scene.h:35
void loadDofs(XERCES_CPP_NAMESPACE::DOMNode *node, std::list< Dof * > *dofs)
Load the dofs of the joint.
Definition: xmlscene.cpp:812
std::map< std::string, meshObjMap > meshMap
Definition: xmlscene.h:17
SceneNode * LoadSceneNode(XERCES_CPP_NAMESPACE::DOMNode *sceneList, const std::string &basePath)
Load the nodes (transformations, geometry, etc.) of the scene.
Definition: xmlscene.cpp:160
bool LoadScene(const std::string &basePath)
Load the scene based in xml archieve.
Definition: xmlscene.cpp:57
Degree Of Freedom - basic component of a Joint.
Definition: dof.h:28
Graphical object made of polygon meshes.
Definition: meshobject.h:25