Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2006, 11:07:31 PM (18 years ago)
Author:
bottac
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/height_map_merge/src/lib/graphics/importer/height_map.cc

    r6730 r6745  
    411411  shiftZ = 0;
    412412}
     413
     414
    413415HeightMap::~HeightMap()
    414416{
     
    505507 scaleY = v.y;
    506508 scaleZ = v.z;
     509 generateNormalVectorField();
    507510}
    508511
     
    518521{
    519522
    520  //x -= offsetX;
    521  //y -= offsetZ;
     523 x -= offsetX;
     524 y -= offsetZ;
    522525 
    523526 
     
    531534 float height = heights[yInt + (xInt)*heightMap->w]*scaleY;
    532535 
    533  /*
     536 
    534537 float a = normalVectorField[(xInt)][yInt].x;
    535538 float b = normalVectorField [(xInt)][yInt].z;
    536539 float c = normalVectorField [(xInt)][yInt].y;
    537540 
    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 
    540547 PRINTF(0)("height: %f \n" ,height );
    541  return (height );
    542 }
     548 return (height + offsetZ);
     549}
Note: See TracChangeset for help on using the changeset viewer.