Changeset 4095 in orxonox.OLD for orxonox/branches/heightMap/src/lib
- Timestamp:
- May 6, 2005, 8:52:06 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap/src/lib/graphics/importer/heightmap.cc
r4093 r4095 1 2 3 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_HEIGHTMAP 1 4 2 5 … … 54 57 else height = pixPerDLSide; 55 58 59 60 56 61 this->readIntoGroup(j*pixPerDLSide,i*pixPerDLSide,width,height,vertexResolution); 57 62 } … … 62 67 63 68 void Heightmap::readIntoGroup(int left, int top,int width, int height, int vertexResolution) 64 { 65 //this->newGroup(); 66 69 { 70 // add all vertices first 67 71 for (int z=top; z < top+height; z++) 68 72 { … … 72 76 } 73 77 } 78 79 80 // code readability 81 int thisVertex = 0; 82 int bottomVertex = width; 83 84 // create all faces 85 for (int z=top; z < top+height - 1; z++) 86 { 87 for (int x=left; x < left+width - 1; x++) 88 { 89 thisVertex++; 90 bottomVertex++; 91 92 this->addFace(3, VERTEX_ONLY, thisVertex, bottomVertex, thisVertex+1); 93 this->addFace(3, VERTEX_ONLY, thisVertex+1, bottomVertex, bottomVertex+1); 94 95 } 96 } 97 98 99 74 100 } 75 101
Note: See TracChangeset
for help on using the changeset viewer.