Last change
on this file since 383 was 302, checked in by Sanahuja Guillaume, 6 years ago |
modifs nouveau build system
|
File size:
1.5 KB
|
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>
|
---|
[167] | 21 | #include <Vector3D.h>
|
---|
| 22 | #include <SColor.h>
|
---|
[8] | 23 |
|
---|
[302] | 24 | //todo make a pimpl to remove these forward declaration
|
---|
| 25 | typedef struct _xmlNode xmlNode;
|
---|
| 26 | typedef unsigned char xmlChar;
|
---|
| 27 | typedef struct _xmlDoc xmlDoc;
|
---|
| 28 |
|
---|
[15] | 29 | namespace flair {
|
---|
| 30 | namespace simulator {
|
---|
| 31 | class Parser : public Gui {
|
---|
[8] | 32 |
|
---|
[15] | 33 | /*can create:
|
---|
[87] | 34 | - cylinders: in y axis
|
---|
| 35 | - fixed cameras
|
---|
[8] | 36 |
|
---|
[15] | 37 | */
|
---|
| 38 | public:
|
---|
[158] | 39 | Parser(int app_width, int app_height, int scene_width,
|
---|
[15] | 40 | int scene_height, std::string media_path, std::string xmlFile);
|
---|
| 41 | ~Parser();
|
---|
| 42 |
|
---|
| 43 | private:
|
---|
| 44 | xmlDoc *doc;
|
---|
| 45 | std::string media_path;
|
---|
| 46 | void processElements(xmlNode *a_node);
|
---|
| 47 | void processObjects(xmlNode *a_node);
|
---|
| 48 | void processParams(xmlNode *a_node);
|
---|
[138] | 49 | irr::video::SColor getScolor(xmlNode *mesh_node);
|
---|
[15] | 50 | irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param);
|
---|
| 51 | irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
|
---|
[87] | 52 | bool isScale = false);
|
---|
[167] | 53 | core::Vector3Df getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
|
---|
[8] | 54 | };
|
---|
| 55 | }
|
---|
| 56 | }
|
---|
| 57 | #endif // PARSER_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.