Changeset 6939 in orxonox.OLD for branches/height_map_merge/src/world_entities
- Timestamp:
- Feb 1, 2006, 2:54:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map_merge/src/world_entities/terrain.cc
r6745 r6939 49 49 heightMapMaterial->setIllum(0.2); 50 50 51 heightMapMaterial->setDiffuse( 1.0,1.0,1.0);52 heightMapMaterial->setAmbient( 1.0,1.0,1.0);53 heightMapMaterial->setSpecular( 1.0,1.0,1.0);51 heightMapMaterial->setDiffuse(0.4,0.4,0.4); 52 heightMapMaterial->setAmbient(0.4,0.4,0.4 ); 53 heightMapMaterial->setSpecular(0.4,0.4,0.4); 54 54 heightMapMaterial->setShininess(.5); 55 55 heightMapMaterial->setTransparency(1.0); … … 112 112 ResourceManager::getInstance()->unload(this->vegetation); 113 113 } 114 115 if(this->heightMap) 116 delete heightMap; 114 117 } 115 118 … … 156 159 157 160 this->heightMap = new HeightMap(hmName, hmColorName); 158 heightMap->scale(Vector( 23.0f,1.1f,23.0f));161 heightMap->scale(Vector(43.0f,4.7f,43.0f)); 159 162 heightMap->setAbsCoor(this->getAbsCoor()); 160 163 heightMap->load(); … … 171 174 172 175 delete this->heightMapMaterial; 173 /* 176 174 177 this->heightMapMaterial = new Material(); 175 178 heightMapMaterial->setTransparency(1.0); … … 191 194 heightMapMaterial->setSpecularMap(textureName); 192 195 193 */ 196 194 197 195 198 } … … 258 261 glLoadIdentity(); 259 262 Vector camera = State::getCamera()->getAbsCoor(); // Go on here ..........!!! 263 264 /* 260 265 float height = heightMap->getHeight(camera.x, camera.z); 261 266 267 262 268 glEnable (GL_COLOR_MATERIAL) ; 263 269 glBegin(GL_QUADS); // Draw The Cube Using quads 264 270 glColor3f(0.0f,1.0f,0.0f); // Color Blue 265 glVertex3f(camera.x + 63.0f, heightMap->getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f); // Top Right Of The Quad (Top)266 glVertex3f(camera.x-63.0f, heightMap->getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f); // Top Left Of The Quad (Top)267 glVertex3f(camera.x-63.0f, heightMap->getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f); // Bottom Left Of The Quad (Top)268 glVertex3f(camera.x+ 63.0f, heightMap->getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f); // Bottom Right Of The Quad (Top)271 glVertex3f(camera.x + 63.0f,Terrain->getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f); // Top Right Of The Quad (Top) 272 glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z-10.0f)+13.0f,camera.z-10.0f); // Top Left Of The Quad (Top) 273 glVertex3f(camera.x-63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f); // Bottom Left Of The Quad (Top) 274 glVertex3f(camera.x+ 63.0f, getHeight(camera.x+63.0f, camera.z+10.0f)+13.0f, camera.z+10.0f); // Bottom Right Of The Quad (Top) 269 275 glEnd(); // End Drawing The Plan 270 276 */ 271 277 272 278 glPopMatrix();
Note: See TracChangeset
for help on using the changeset viewer.