Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/objects/Mesh.cc @ 588

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

bump

File size: 967 bytes
Line 
1#include <sstream>
2
3#include "Mesh.h"
4#include "../orxonox.h"
5
6namespace orxonox
7{
8    unsigned int Mesh::meshCounter_s = 0;
9
10    Mesh::Mesh()
11    {
12        this->entity_ = 0;
13    }
14
15    Mesh::Mesh(const std::string& file)
16    {
17        std::cout << "Mesh: 1\n";
18        std::ostringstream name;
19        std::cout << "Mesh: 2\n";
20        name << (Mesh::meshCounter_s++);
21        std::cout << "Mesh: 3, entity before creation: " << this->entity_ << "\n";
22        std::cout << ("Mesh: name: Mesh" + name.str()) << std::endl;
23        std::cout << "Mesh: file: " << file << std::endl;
24        this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str() + "gugus", file);
25        std::cout << "Mesh: 4, entity after creation: " << this->entity_ << "\n";
26    }
27
28    Mesh::~Mesh()
29    {
30        if (this->entity_)
31            Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);
32    }
33}
Note: See TracBrowser for help on using the repository browser.