Changeset 6454 in orxonox.OLD for trunk/src/lib/graphics/importer/grid.cc
- Timestamp:
- Jan 9, 2006, 11:20:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/grid.cc
r6446 r6454 27 27 Grid::Grid(float sizeX, float sizeY, unsigned int rows, unsigned int columns) 28 28 { 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); 51 30 52 31 this->_rows = rows;
Note: See TracChangeset
for help on using the changeset viewer.