|
Last change
on this file since 578 was
576,
checked in by landauf, 18 years ago
|
|
added Mesh and Model (doesn't work yet, but i don't want to have merge conflicts all the time )
|
|
File size:
781 bytes
|
| Line | |
|---|
| 1 | #include <sstream> |
|---|
| 2 | |
|---|
| 3 | #include "Mesh.h" |
|---|
| 4 | #include "../orxonox.h" |
|---|
| 5 | |
|---|
| 6 | namespace 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 << "blu_1\n"; |
|---|
| 18 | std::ostringstream name; |
|---|
| 19 | std::cout << "blu_2\n"; |
|---|
| 20 | name << (Mesh::meshCounter_s++); |
|---|
| 21 | std::cout << "blu_3\n"; |
|---|
| 22 | std::cout << ("Mesh" + name.str()) << std::endl; |
|---|
| 23 | this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file); |
|---|
| 24 | std::cout << "blu_4\n"; |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | Mesh::~Mesh() |
|---|
| 28 | { |
|---|
| 29 | if (this->entity_) |
|---|
| 30 | Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_); |
|---|
| 31 | } |
|---|
| 32 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.