Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 6, 2005, 8:52:06 PM (19 years ago)
Author:
nico
Message:

branches/heightmap: i want modular debug

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
    14
    25
     
    5457                        else                                                                            height = pixPerDLSide;
    5558                       
     59                       
     60                       
    5661                        this->readIntoGroup(j*pixPerDLSide,i*pixPerDLSide,width,height,vertexResolution);
    5762                }
     
    6267
    6368void Heightmap::readIntoGroup(int left, int top,int width, int height, int vertexResolution)
    64 {
    65         //this->newGroup();
    66        
     69{       
     70        // add all vertices first
    6771        for (int z=top; z < top+height; z++)
    6872        {
     
    7276                }
    7377        }
     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
    74100}
    75101
Note: See TracChangeset for help on using the changeset viewer.