Commit d63d152f authored by wangdawei's avatar wangdawei

test

parent 03b9b75f
...@@ -163,7 +163,6 @@ double MeshArea::AreaAvgGridCnt(const Vector3d &pose) ...@@ -163,7 +163,6 @@ double MeshArea::AreaAvgGridCnt(const Vector3d &pose)
return false; return false;
} }
double total = 0; double total = 0;
size_t cnt = 0;
Vector2i shiftedIndexToLoad = Vector2i shiftedIndexToLoad =
calShiftedIndex(pose.x(), pose.y()); calShiftedIndex(pose.x(), pose.y());
for(unsigned int i = 0; i < loadNeighbors_.size(); i++){ for(unsigned int i = 0; i < loadNeighbors_.size(); i++){
...@@ -172,13 +171,9 @@ double MeshArea::AreaAvgGridCnt(const Vector3d &pose) ...@@ -172,13 +171,9 @@ double MeshArea::AreaAvgGridCnt(const Vector3d &pose)
if(blockContent.blockState == CurrMesh && if(blockContent.blockState == CurrMesh &&
blockContent.block->isLoad()){ blockContent.block->isLoad()){
total += blockContent.block->GetGridSize(); total += blockContent.block->GetGridSize();
cnt++;
} }
} }
if(0 == cnt){ return total / loadNeighbors_.size();
return 0;
}
return total / cnt;
} }
void MeshArea::loadArea(const Vector2d &bl) void MeshArea::loadArea(const Vector2d &bl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment