Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6467 in orxonox.OLD for trunk/src/lib/graphics/importer/grid.cc


Ignore:
Timestamp:
Jan 11, 2006, 11:46:52 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: Texture loading with GL_TEXTURE_* in ResourceManager and Material

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/grid.cc

    r6458 r6467  
    3333  this->_sizeX = sizeX;
    3434  this->_sizeY = sizeY;
    35   this->_gridSpacingX = sizeX / rows;
    36   this->_gridSpacingY = sizeY / columns;
     35  this->_gridSpacingX = sizeX / (float)rows;
     36  this->_gridSpacingY = sizeY / (float)columns;
    3737}
    3838
     
    5353    for (unsigned int j = 1; j < this->_columns-1; j++)
    5454    {
    55      Vector test(
    56           (this->vertex(i*_columns+j).y + this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y ) /maxHeight,
    57           1.0,
    58           (this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y + this->vertex(i*_columns+j+1).y)/maxHeight
    59                 );
     55/*
     56      Vector test( this->_gridSpacingX/(this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y) +
     57          this->_gridSpacingX/(this->vertex(i*_columns+j+1).y - this->vertex(i*_columns+j).y)
     58          ,
     59      _gridSpacingX,
     60      this->_gridSpacingY/(this->vertex(i*_columns+j).y - this->vertex((i-1)*_columns+j).y) +
     61          this->_gridSpacingX/(this->vertex((i+1)*_columns+j).y - this->vertex(i*_columns+j).y)
     62                 );*/
     63
     64
     65
     66      Vector test  (
     67          (-this->vertex(i*_columns+j-1).y - this->vertex(i*_columns+j+1).y)/maxHeight,
     68            1.0,
     69            (-this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y)/maxHeight
     70          );
     71
     72
     73//      Vector test(
     74//           (this->vertex(i*_columns+j).y + this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y ) /maxHeight,
     75//           1.0,
     76//           (this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y + this->vertex(i*_columns+j+1).y)/maxHeight
     77//                 );
    6078      this->normal( i*_columns+j) = test.getNormalized();
    6179    }
Note: See TracChangeset for help on using the changeset viewer.