Changeset 6745 in orxonox.OLD for branches/height_map_merge/src/lib
- Timestamp:
- Jan 25, 2006, 11:07:31 PM (19 years ago)
- Location:
- branches/height_map_merge/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map_merge/src/lib/graphics/importer/height_map.cc
r6730 r6745 411 411 shiftZ = 0; 412 412 } 413 414 413 415 HeightMap::~HeightMap() 414 416 { … … 505 507 scaleY = v.y; 506 508 scaleZ = v.z; 509 generateNormalVectorField(); 507 510 } 508 511 … … 518 521 { 519 522 520 //x -= offsetX;521 //y -= offsetZ;523 x -= offsetX; 524 y -= offsetZ; 522 525 523 526 … … 531 534 float height = heights[yInt + (xInt)*heightMap->w]*scaleY; 532 535 533 /*536 534 537 float a = normalVectorField[(xInt)][yInt].x; 535 538 float b = normalVectorField [(xInt)][yInt].z; 536 539 float c = normalVectorField [(xInt)][yInt].y; 537 540 538 height -= ( (a/c)*(x) + (b/c)*(y)); 539 */ 541 PRINTF(0)("a: %f \n" ,a); 542 PRINTF(0)("b: %f \n" ,b); 543 PRINTF(0)("c: %f \n" ,c); 544 545 height += ( (a/c)*(x) + (b/c)*(y)); 546 540 547 PRINTF(0)("height: %f \n" ,height ); 541 return (height );542 } 548 return (height + offsetZ); 549 } -
branches/height_map_merge/src/lib/graphics/importer/height_map.h
r6730 r6745 19 19 #define texRate 32 20 20 #define texRatef 4.0f 21 #define tileSize 3221 #define tileSize 64 22 22 23 23 class SDL_Surface;
Note: See TracChangeset
for help on using the changeset viewer.