Revision 1378,
694 bytes
checked in by giegl, 18 years ago
(diff) |
GTPD - Jungle Rumble - integrate into GTP SVN structure
|
Line | |
---|
1 | #include "dxstdafx.h"
|
---|
2 | #include "./SkyBox.h"
|
---|
3 | #include "./Terrain.h"
|
---|
4 |
|
---|
5 | SkyBox::SkyBox(void):Node() {
|
---|
6 | this->nodeType |= GameScene::NODE_SKYBOX;
|
---|
7 | }
|
---|
8 |
|
---|
9 | void SkyBox::generateSkyBox(std::string filename)
|
---|
10 | {
|
---|
11 | //generate Object3d for Skybox and add it to the scene
|
---|
12 | Object3d *p = (Object3d *) this->myScene->createNode(this->myScene->NODE_OBJECT3D, *this->myScene->getRoot(), true);
|
---|
13 | this->myBox = p;
|
---|
14 |
|
---|
15 | //create renderer
|
---|
16 | SPTR<Renderer> renderer(new SkyBoxRenderer);
|
---|
17 | renderer->setScene(*this->myScene);
|
---|
18 | this->myScene->connectNodeAndRenderer(*p, renderer);
|
---|
19 |
|
---|
20 | p->loadMeshFromFile(filename);
|
---|
21 | }
|
---|
22 |
|
---|
23 | SkyBox::~SkyBox(void)
|
---|
24 | {
|
---|
25 | }
|
---|
26 |
|
---|
27 | Object3d* SkyBox::getBoxObject() {
|
---|
28 | return this->myBox;
|
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.