Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6329 in orxonox.OLD for branches/height_map/src/world_entities


Ignore:
Timestamp:
Dec 28, 2005, 1:51:28 PM (19 years ago)
Author:
bottac
Message:

Fixed some bugs.

File:
1 edited

Legend:

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

    r6268 r6329  
    4444  this->tmp_mat = new Material();
    4545  tmp_mat->setTransparency(1.0);
    46   tmp_mat->setIllum(0.3);
     46  tmp_mat->setIllum(0.2);
    4747/*  tmp_mat->setDiffuse(0.55,0.4,0.2);
    4848  tmp_mat->setAmbient(0.6,0.4,0.2);
     
    5151  tmp_mat->setAmbient(1.0,1.0,1.0 );
    5252  tmp_mat->setSpecular(1.0,1.0,1.0);
    53   tmp_mat->setShininess(.1);
     53  tmp_mat->setShininess(.5);
    5454  tmp_mat->setTransparency(1.0);
    5555
    5656  tmp_mat->diffuseTexture = NULL;
    5757  tmp_mat->ambientTexture = NULL;
    58  // tmp_mat->specularTexture = NULL;
     58  tmp_mat->specularTexture = NULL;
    5959 
     60    const  char* texture_name = "pictures/ground1.tga";
     61  tmp_mat->setDiffuseMap(texture_name);
     62  tmp_mat->setAmbientMap(texture_name);
     63   tmp_mat->setSpecularMap(texture_name);
    6064  // this->loadParams(root);
    6165
     
    6367 char* colourmapName = ResourceManager::getFullName("pictures/heightmapHelloCM.bmp");
    6468 hm = new HeightMap(heightmapName, colourmapName);
    65  hm->scale(Vector(23.0f,1.7f,23.0f));
     69 hm->scale(Vector(43.0f,1.10f,43.0f));
     70 hm->shift(Vector(-1000.0,-1500.0,-1000.0));
    6671 hm->load();
    6772 this->model=hm;
     
    217222  glPushMatrix();
    218223
     224 
    219225  /* translate */
    220   glTranslatef (this->getAbsCoor ().x - 1000,
    221                 this->getAbsCoor ().y - 400,
    222                 this->getAbsCoor ().z - 1000)   ;
     226 glTranslatef (this->getAbsCoor ().x ,
     227               this->getAbsCoor ().y ,
     228               this->getAbsCoor ().z)   ;
     229 
    223230  /* rotate */
    224   Vector tmpRot = this->getAbsDir().getSpacialAxis();
    225   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    226        
    227    //this->tmp_mat->select();
    228        
    229 
    230   hm->draw();
     231 Vector tmpRot = this->getAbsDir().getSpacialAxis();
     232 glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     233 
     234        
     235 
     236 this->tmp_mat->select();
     237 hm->draw();
    231238 /* if (this->objectList)
    232239    glCallList(this->objectList);
Note: See TracChangeset for help on using the changeset viewer.