Last change
on this file since 507 was
507,
checked in by nicolape, 16 years ago
|
- Skybox and ambient light load now from level file sample.oxw. Added objects to and methods to parse this tags. Added a tokenizer function to split strings into smaller strings (for reading out the light colours for examle). Moved Tokenizer and String2number into misc directory. deleted old unised xml class
|
File size:
779 bytes
|
Line | |
---|
1 | #include <OgreSceneManager.h> |
---|
2 | #include <string> |
---|
3 | |
---|
4 | #include "../orxonox.h" |
---|
5 | #include "../../tinyxml/tinyxml.h" |
---|
6 | #include "../../misc/Tokenizer.h" |
---|
7 | #include "../../misc/String2Number.h" |
---|
8 | |
---|
9 | #include "Skybox.h" |
---|
10 | |
---|
11 | namespace orxonox |
---|
12 | { |
---|
13 | CreateFactory(Skybox); |
---|
14 | |
---|
15 | Skybox::Skybox() |
---|
16 | { |
---|
17 | RegisterObject(Skybox); |
---|
18 | } |
---|
19 | |
---|
20 | Skybox::~Skybox() |
---|
21 | { |
---|
22 | } |
---|
23 | |
---|
24 | void Skybox::loadParams(TiXmlElement* xmlElem) |
---|
25 | { |
---|
26 | Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager(); |
---|
27 | |
---|
28 | if (xmlElem->Attribute("src")) |
---|
29 | { |
---|
30 | std::string skyboxSrc = xmlElem->Attribute("src"); |
---|
31 | mgr->setSkyBox(true, skyboxSrc); |
---|
32 | |
---|
33 | std::cout << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl; |
---|
34 | } |
---|
35 | } |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.