Changeset 4597 in orxonox.OLD for orxonox/trunk/src/world_entities/skybox.cc
- Timestamp:
- Jun 11, 2005, 12:55:48 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/skybox.cc
r4444 r4597 1 1 2 /* 2 /* 3 3 orxonox - the future of 3D-vertical-scrollers 4 4 … … 68 68 { 69 69 this->setClassID(CL_SKYBOX, "SkyBox"); 70 70 71 this->skyModel = NULL; 71 72 this->material = new Material*[6]; 72 for (int i = 0; i < 6; i++) 73 for (int i = 0; i < 6; i++) 73 74 { 74 75 this->material[i] = new Material(); … … 104 105 usage: give this function an argument like 105 106 setTexture("skybox", "jpg"); 106 and it will convert this to 107 and it will convert this to 107 108 setTextures("skybox_top.jpg", "skybox_bottom.jpg", "skybox_left.jpg", 108 109 "skybox_right.jpg", "skybox_front.jpg", "skybox_back.jpg"); … … 123 124 sprintf(front, "%s_front.%s", name, extension); 124 125 sprintf(back, "%s_back.%s", name, extension); 125 126 126 127 this->setTextures(top, bottom, left, right, front, back); 127 128 … … 180 181 /** 181 182 \brief rebuilds the SkyBox 182 183 183 184 this must be done, when changing the Size of the Skybox (runtime-efficency) 184 185 */ … … 189 190 skyModel = new Model(); 190 191 191 this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size); 192 this->skyModel->addVertex (-0.5*size, -0.5*size, 0.5*size); 192 193 this->skyModel->addVertex (0.5*size, -0.5*size, 0.5*size); 193 194 this->skyModel->addVertex (-0.5*size, 0.5*size, 0.5*size); … … 222 223 this->skyModel->setMaterial(material[5]); 223 224 this->skyModel->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back 224 225 225 226 this->skyModel->finalize(); 226 227 }
Note: See TracChangeset
for help on using the changeset viewer.