Last change
on this file since 211 was 167, checked in by Sanahuja Guillaume, 8 years ago |
modifs pour template vectors
|
File size:
1.4 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>
|
---|
[8] | 22 | #include <libxml/parser.h>
|
---|
| 23 | #include <libxml/tree.h>
|
---|
[167] | 24 | #include <SColor.h>
|
---|
[8] | 25 |
|
---|
[15] | 26 | namespace flair {
|
---|
| 27 | namespace simulator {
|
---|
| 28 | class Parser : public Gui {
|
---|
[8] | 29 |
|
---|
[15] | 30 | /*can create:
|
---|
[87] | 31 | - cylinders: in y axis
|
---|
| 32 | - fixed cameras
|
---|
[8] | 33 |
|
---|
[15] | 34 | */
|
---|
| 35 | public:
|
---|
[158] | 36 | Parser(int app_width, int app_height, int scene_width,
|
---|
[15] | 37 | int scene_height, std::string media_path, std::string xmlFile);
|
---|
| 38 | ~Parser();
|
---|
| 39 |
|
---|
| 40 | private:
|
---|
| 41 | xmlDoc *doc;
|
---|
| 42 | std::string media_path;
|
---|
| 43 | void processElements(xmlNode *a_node);
|
---|
| 44 | void processObjects(xmlNode *a_node);
|
---|
| 45 | void processParams(xmlNode *a_node);
|
---|
[138] | 46 | irr::video::SColor getScolor(xmlNode *mesh_node);
|
---|
[15] | 47 | irr::core::vector3df getMeshVect(xmlNode *mesh_node, xmlChar *param);
|
---|
| 48 | irr::core::vector3df getSceneVect(xmlNode *mesh_node, xmlChar *param,
|
---|
[87] | 49 | bool isScale = false);
|
---|
[167] | 50 | core::Vector3Df getMeshVector3D(xmlNode *mesh_node, xmlChar *param);
|
---|
[8] | 51 | };
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 | #endif // PARSER_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.