Changeset 8747 in orxonox.OLD for branches/terrain/src/lib/graphics
- Timestamp:
- Jun 23, 2006, 4:45:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/graphics/importer/terrain/terrain.h
r8745 r8747 206 206 inline float Terrain::getAltitude( int _x, int _z ) const 207 207 { 208 if ( _x < 0 || _x > heightfield.width || _z < 0 || _z > heightfield.height ) 209 return 0.0f; 208 210 return heightfield.data[heightfield.pitch*_z+_x]/255.0f; 209 211 }
Note: See TracChangeset
for help on using the changeset viewer.