Rev | Line | |
---|
[576] | 1 | #include <sstream> |
---|
| 2 | |
---|
| 3 | #include "Mesh.h" |
---|
[614] | 4 | #include "../Orxonox.h" |
---|
[576] | 5 | |
---|
| 6 | namespace orxonox |
---|
| 7 | { |
---|
| 8 | unsigned int Mesh::meshCounter_s = 0; |
---|
| 9 | |
---|
| 10 | Mesh::Mesh() |
---|
| 11 | { |
---|
| 12 | this->entity_ = 0; |
---|
| 13 | } |
---|
| 14 | |
---|
[589] | 15 | void Mesh::setMesh(const std::string& file) |
---|
[576] | 16 | { |
---|
| 17 | std::ostringstream name; |
---|
| 18 | name << (Mesh::meshCounter_s++); |
---|
[633] | 19 | this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file); |
---|
[576] | 20 | } |
---|
| 21 | |
---|
| 22 | Mesh::~Mesh() |
---|
| 23 | { |
---|
| 24 | if (this->entity_) |
---|
| 25 | Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_); |
---|
| 26 | } |
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.