Rev | Line | |
---|
[15] | 1 | // %flair:license{
|
---|
[10] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[15] | 4 | // %flair:license}
|
---|
[8] | 5 | // created: 2013/08/02
|
---|
| 6 | // filename: Parser.h
|
---|
| 7 | //
|
---|
| 8 | // author: César Richard
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: classe chargeant un XML decrivant une map
|
---|
| 14 | //
|
---|
| 15 | /*********************************************************************/
|
---|
| 16 |
|
---|
| 17 | #ifndef PARSER_H
|
---|
| 18 | #define PARSER_H
|
---|
| 19 |
|
---|
| 20 | #include <Gui.h>
|
---|
| 21 | #include <libxml/parser.h>
|
---|
| 22 | #include <libxml/tree.h>
|
---|
[138] | 23 | #include <SColor.h>
|
---|
[87] | 24 |
|
---|
| 25 | namespace flair {
|
---|
| 26 | namespace core {
|
---|
| 27 | class Vector3D;
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
[8] | 30 |
|
---|
[15] | 31 | namespace flair {
|
---|
| 32 | namespace simulator {
|
---|
| 33 | class Parser : public Gui {
|
---|
[8] | 34 |
|
---|
[15] | 35 | /*can create:
|
---|
[87] | 36 | - cylinders: in y axis
|
---|
| 37 | - fixed cameras
|
---|
[8] | 38 |
|
---|
[15] | 39 | */
|
---|
| 40 | public:
|
---|
| 41 | Parser(Simulator *parent, int app_width, int app_height, int scene_width,
|
---|
| 42 | int scene_height, std::string media_path, std::string xmlFile);
|
---|
| 43 | ~Parser();
|
---|
| 44 |
|
---|
| 45 | private:
|
---|
| 46 | xmlDoc *doc;
|
---|
| 47 | std::string media_path;
|
---|
| 48 | Simulator *parent;
|
---|
| 49 | void processElements(xmlNode *a_node);
|
---|
| 50 | void processObjects(xmlNode *a_node);
|
---|
| 51 | void processParams(xmlNode *a_node);
|
---|
[138] | 52 | irr::video::SColor getScolor(xmlNode *mesh_node);
|
---|
[15] | 53 | irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param);
|
---|
| 54 | irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
|
---|
[87] | 55 | bool isScale = false);
|
---|
| 56 | core::Vector3D getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
|
---|
[8] | 57 | };
|
---|
| 58 | }
|
---|
| 59 | }
|
---|
| 60 | #endif // PARSER_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.