Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 1, 2006, 2:54:01 PM (18 years ago)
Author:
bottac
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/height_map_merge/src/world_entities/terrain.cc

    r6745 r6939  
    4949   heightMapMaterial->setIllum(0.2);
    5050
    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);
    5454   heightMapMaterial->setShininess(.5);
    5555   heightMapMaterial->setTransparency(1.0);
     
    112112    ResourceManager::getInstance()->unload(this->vegetation);
    113113  }
     114 
     115  if(this->heightMap)
     116        delete heightMap;
    114117}
    115118
     
    156159
    157160  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));
    159162  heightMap->setAbsCoor(this->getAbsCoor());
    160163  heightMap->load();
     
    171174
    172175delete this->heightMapMaterial;
    173 /*   
     176
    174177   this->heightMapMaterial = new Material();
    175178   heightMapMaterial->setTransparency(1.0);
     
    191194   heightMapMaterial->setSpecularMap(textureName);     
    192195 
    193 */
     196
    194197
    195198}
     
    258261glLoadIdentity();
    259262 Vector camera =   State::getCamera()->getAbsCoor(); // Go on here ..........!!!
     263   
     264    /*
    260265    float height =    heightMap->getHeight(camera.x, camera.z);
    261266   
     267 
    262268  glEnable (GL_COLOR_MATERIAL) ;
    263269    glBegin(GL_QUADS);            // Draw The Cube Using quads
    264270    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)
    269275   glEnd();                      // End Drawing The Plan
    270    
     276   */
    271277   
    272278glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.