Changeset 899
- Timestamp:
- 03/19/08 17:10:09
- Files:
-
- trunk/src/vpb/DataSet.cpp (modified) (1 diff)
- trunk/src/vpb/HeightFieldMapper.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vpb/DataSet.cpp
r898 r899 1116 1116 if (getBuildOptionsString().find("old_dg")!=std::string::npos) 1117 1117 { 1118 log(osg::NOTICE,"Old DataSet::createDestinationGraph() selected"); 1119 1118 1120 _destinationGraph = createDestinationGraph(0, 1119 1121 _intermediateCoordinateSystem.get(), trunk/src/vpb/HeightFieldMapper.cpp
r875 r899 723 723 724 724 if ((c>=0 && c<_hf.getNumColumns()) && (r>=0 && r<_hf.getNumRows())) 725 { 726 total_ratio = (1.0-rx)*(1.0-ry);727 total_height = _hf.getHeight(c,r);725 { double local_ratio = (1.0-rx)*(1.0-ry); 726 total_ratio += local_ratio; 727 total_height += _hf.getHeight(c,r)*local_ratio; 728 728 } 729 729 730 730 if (((c+1)>=0 && (c+1)<_hf.getNumColumns()) && (r>=0 && r<_hf.getNumRows())) 731 731 { 732 total_ratio = rx*(1.0-ry); 733 total_height = _hf.getHeight(c+1,r); 732 double local_ratio = rx*(1.0-ry); 733 total_ratio += local_ratio; 734 total_height += _hf.getHeight(c+1,r)*local_ratio; 734 735 } 735 736 736 737 if ((c>=0 && c<_hf.getNumColumns()) && ((r+1)>=0 && (r+1)<_hf.getNumRows())) 737 738 { 738 total_ratio = (1.0-rx)*ry; 739 total_height = _hf.getHeight(c,r+1); 739 double local_ratio = (1.0-rx)*ry; 740 total_ratio += local_ratio; 741 total_height += _hf.getHeight(c,r+1)*local_ratio; 740 742 } 741 743 742 744 if (((c+1)>=0 && (c+1)<_hf.getNumColumns()) && ((r+1)>=0 && (r+1)<_hf.getNumRows())) 743 745 { 744 total_ratio = rx*ry; 745 total_height = _hf.getHeight(c+1,r+1); 746 double local_ratio = rx*ry; 747 total_ratio += local_ratio; 748 total_height += _hf.getHeight(c+1,r+1)*local_ratio; 746 749 } 747 750
