Changeset 8748 in orxonox.OLD for branches/terrain/src/lib/graphics/importer/terrain/terrain.h
- Timestamp:
- Jun 23, 2006, 5:07:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/graphics/importer/terrain/terrain.h
r8747 r8748 165 165 * Creates the quad tree structure for fast culling of the terrain pages. 166 166 */ 167 pTerrainQuad createQuadTree( int _x0, int _z0, int _x1, int _z1, int _depth = 0 ); 167 pTerrainQuad createQuadTree( int _x0, int _z0, 168 int _x1, int _z1, int _depth = 0 ); 168 169 169 170 /** … … 206 207 inline float Terrain::getAltitude( int _x, int _z ) const 207 208 { 208 if ( _x < 0 || _x > heightfield.width || _z < 0 || _z > heightfield.height )209 if ( _x < 0 || _x >= heightfield.width || _z < 0 || _z >= heightfield.height ) { 209 210 return 0.0f; 211 printf( "outside!\n" ); 212 } 210 213 return heightfield.data[heightfield.pitch*_z+_x]/255.0f; 211 214 }
Note: See TracChangeset
for help on using the changeset viewer.