Changeset 3805 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Apr 13, 2005, 9:02:39 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3803 r3805 333 333 // this->spawn(this->skySphere); 334 334 skyBox = new SkyBox(); 335 skyBox->setTexture("pictures/skybox", "bmp"); 336 skyBox->setParent(localCamera); 335 337 this->spawn(skyBox); 336 338 -
orxonox/trunk/src/world_entities/skybox.cc
r3803 r3805 51 51 this->material[i] = new Material(); 52 52 this->material[i]->setIllum(3); 53 this->material[i]->setAmbient(1.0, 1.0, 1.0); 53 this->material[i]->setDiffuse(0.0,0.0,0.0); 54 this->material[i]->setSpecular(0.0,0.0,0.0); 55 this->material[i]->setAmbient(2.0, 2.0, 2.0); 54 56 } 55 57 this->setMode(PNODE_MOVEMENT); 56 58 57 58 59 59 this->setSize(1900.0); 60 this->rebuild();61 60 } 62 61 … … 126 125 this->material[4]->setDiffuseMap(front); 127 126 this->material[5]->setDiffuseMap(back); 127 128 this->rebuild(); 128 129 } 129 130 … … 135 136 { 136 137 this->size = size; 138 139 this->rebuild(); 137 140 } 138 141 … … 148 151 model = new Model(); 149 152 150 model->addVertex (-0.5*size, -0.5*size, 0.5*size); 153 model->addVertex (-0.5*size, -0.5*size, 0.5*size); 151 154 model->addVertex (0.5*size, -0.5*size, 0.5*size); 152 155 model->addVertex (-0.5*size, 0.5*size, 0.5*size); … … 159 162 model->addVertexTexture (0.0, 0.0); 160 163 model->addVertexTexture (1.0, 0.0); 164 model->addVertexTexture (1.0, 1.0); 161 165 model->addVertexTexture (0.0, 1.0); 162 model->addVertexTexture (1.0, 1.0);163 model->addVertexTexture (0.0, 2.0);164 model->addVertexTexture (1.0, 2.0);165 model->addVertexTexture (0.0, 3.0);166 model->addVertexTexture (1.0, 3.0);167 model->addVertexTexture (0.0, 4.0);168 model->addVertexTexture (1.0, 4.0);169 model->addVertexTexture (2.0, 0.0);170 model->addVertexTexture (2.0, 1.0);171 model->addVertexTexture (-1.0, 0.0);172 model->addVertexTexture (-1.0, 1.0);173 166 174 167 model->addVertexNormal (0.0, 0.0, 1.0); 175 model->addVertexNormal (0.0, 0.0, 1.0);176 model->addVertexNormal (0.0, 0.0, 1.0);177 model->addVertexNormal (0.0, 0.0, 1.0);178 model->addVertexNormal (0.0, 1.0, 0.0);179 model->addVertexNormal (0.0, 1.0, 0.0);180 model->addVertexNormal (0.0, 1.0, 0.0);181 168 model->addVertexNormal (0.0, 1.0, 0.0); 182 169 model->addVertexNormal (0.0, 0.0, -1.0); 183 model->addVertexNormal (0.0, 0.0, -1.0);184 model->addVertexNormal (0.0, 0.0, -1.0);185 model->addVertexNormal (0.0, 0.0, -1.0);186 model->addVertexNormal (0.0, -1.0, 0.0);187 model->addVertexNormal (0.0, -1.0, 0.0);188 model->addVertexNormal (0.0, -1.0, 0.0);189 170 model->addVertexNormal (0.0, -1.0, 0.0); 190 171 model->addVertexNormal (1.0, 0.0, 0.0); 191 model->addVertexNormal (1.0, 0.0, 0.0);192 model->addVertexNormal (1.0, 0.0, 0.0);193 model->addVertexNormal (1.0, 0.0, 0.0);194 model->addVertexNormal (-1.0, 0.0, 0.0);195 model->addVertexNormal (-1.0, 0.0, 0.0);196 model->addVertexNormal (-1.0, 0.0, 0.0);197 172 model->addVertexNormal (-1.0, 0.0, 0.0); 198 173 199 174 model->addUseMtl(material[0]); 200 model->addFace (4, 3, 1,1,1, 2,2,2, 4,4,3, 3,3,4);175 model->addFace (4, 3, 3,2,4, 4,3,4, 6,4,4, 5,1,4); // top 201 176 model->addUseMtl(material[1]); 202 model->addFace (4, 3, 3,3,5, 4,4,6, 6,6,7, 5,5,8);177 model->addFace (4, 3, 7,4,2, 8,1,2, 2,2,2, 1,3,2); // bottom 203 178 model->addUseMtl(material[2]); 204 model->addFace (4, 3, 5,5,9, 6,6,10, 8,8,11, 7,7,12);179 model->addFace (4, 3, 1,1,3, 2,2,3, 4,3,3, 3,4,3); // left 205 180 model->addUseMtl(material[3]); 206 model->addFace (4, 3, 7,7,13, 8,8,14, 2,10,15, 1,9,16);181 model->addFace (4, 3, 5,3,1, 6,4,1, 8,1,1, 7,2,1); // right 207 182 model->addUseMtl(material[4]); 208 model->addFace (4, 3, 2, 2,17, 8,11,18, 6,12,19, 4,4,20);183 model->addFace (4, 3, 2,1,6, 8,2,6, 6,3,6, 4,4,6); // front 209 184 model->addUseMtl(material[5]); 210 model->addFace (4, 3, 7,1 3,21, 1,1,22, 3,3,23, 5,14,24);185 model->addFace (4, 3, 7,1,5, 1,2,5, 3,3,5, 5,4,5); // back 211 186 212 187 model->finalize();
Note: See TracChangeset
for help on using the changeset viewer.