Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/objects/Model.cc @ 586

Last change on this file since 586 was 586, checked in by landauf, 16 years ago

bump

File size: 1.8 KB
Line 
1#include <string>
2
3#include "Model.h"
4#include "../core/CoreIncludes.h"
5#include "../orxonox.h"
6#include "../../tinyxml/tinyxml.h"
7#include "../../misc/Tokenizer.h"
8#include "../../misc/String2Number.h"
9
10namespace orxonox
11{
12    CreateFactory(Model);
13
14    Model::Model()
15    {
16        RegisterObject(Model);
17    }
18
19    Model::~Model()
20    {
21    }
22
23    void Model::loadParams(TiXmlElement* xmlElem)
24    {
25std::cout << "### START PARSING MODEL" << std::endl;
26        WorldEntity::loadParams(xmlElem);
27
28
29std::cout << "Model: 1\n";
30        if (xmlElem->Attribute("mesh"))
31        {
32std::cout << "Model: 2_1\n";
33                std::string src = xmlElem->Attribute("mesh");
34std::cout << "Model: 2_2\n";
35std::cout << "Model: mesh before creation: " << &this->mesh_ << std::endl;
36std::cout << "Model: entity before creation: " << this->mesh_.getEntity() << std::endl;
37                this->mesh_ = Mesh(src);
38std::cout << "Model: 2_3\n";
39std::cout << "Model: entity after creation: " << this->mesh_.getEntity() << std::endl;
40std::cout << "Model: mesh after creation: " << &this->mesh_ << std::endl;
41std::cout << "Model: node: " << this->getNode() << std::endl;
42
43//Entity *ent2 = Orxonox::getSingleton()->getSceneManager()->createEntity( "Robot2", "ogrehead.mesh" );
44//SceneNode *node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode2", Vector3( 50, 0, 0 ) );
45//node2->attachObject( ent2 );
46//this->attachObject( ent2 );
47//node2->attachObject( this->mesh_.getEntity() );
48this->attachObject( this->mesh_.getEntity() );
49
50//                  this->attachObject(this->mesh_.getEntity());
51std::cout << "Model: 2_4\n";
52        }
53std::cout << "Model: 3\n";
54std::cout << "### FINISHED PARSING MODEL" << std::endl;
55
56        COUT(4) << "Loader: Created model" << std::endl;
57    }
58}
Note: See TracBrowser for help on using the repository browser.