Line | |
---|
1 | #include <sstream> |
---|
2 | |
---|
3 | #include "BillboardSet.h" |
---|
4 | #include "../Orxonox.h" |
---|
5 | |
---|
6 | namespace orxonox |
---|
7 | { |
---|
8 | unsigned int BillboardSet::billboardSetCounter_s = 0; |
---|
9 | |
---|
10 | BillboardSet::BillboardSet() |
---|
11 | { |
---|
12 | this->billboardSet_ = 0; |
---|
13 | } |
---|
14 | |
---|
15 | void BillboardSet::setBillboardSet(const std::string& file, const Ogre::ColourValue& colour, int count, const Ogre::Vector3& position) |
---|
16 | { |
---|
17 | std::ostringstream name; |
---|
18 | name << (BillboardSet::billboardSetCounter_s++); |
---|
19 | this->billboardSet_ = Orxonox::getSingleton()->getSceneManager()->createBillboardSet("Billboard" + name.str(), count); |
---|
20 | this->billboardSet_->createBillboard(position, colour); |
---|
21 | this->billboardSet_->setMaterialName(file); |
---|
22 | } |
---|
23 | |
---|
24 | BillboardSet::~BillboardSet() |
---|
25 | { |
---|
26 | if (this->billboardSet_) |
---|
27 | Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_); |
---|
28 | } |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.