Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 9, 2006, 11:20:37 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: changing the height of the Grid should work

File:
1 edited

Legend:

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

    r6446 r6454  
    2727Grid::Grid(float sizeX, float sizeY, unsigned int rows, unsigned int columns)
    2828{
    29 
    30   GLuint i, j;
    31   for (i = 0; i < rows; i++)
    32   {
    33     for (j = 0; j < columns; j++)
    34     {
    35       this->addVertex((float)i - (float)sizeY/2.0, 0.0, (float)j - (float)sizeX/2.0);
    36       this->addNormal(0.0, 1, 0.0);
    37       this->addTexCoor((float)i/(float)columns, (float)j/(float)rows);
    38       this->addColor((float)i/20.0, 0.0, (float)j/20.0);
    39     }
    40   }
    41 
    42   for (i = 0; i < rows-1; i++)
    43   {
    44     for (j = 0; j < columns; j++)
    45     {
    46       this->addIndice( rows*i + j );
    47       this->addIndice( rows*(i+1) + j );
    48     }
    49     this->newStripe();
    50   }
     29  this->planeModel(sizeX, sizeY, rows, columns);
    5130
    5231  this->_rows = rows;
Note: See TracChangeset for help on using the changeset viewer.