Skip to content

Commit d11490f

Browse files
authored
Merge pull request #99 from naturerobots/feat/use-vertex-normals-in-height-differences
Use vertex's normal to define the local plane for height diff calculation
2 parents a614b51 + 242cb21 commit d11490f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mesh_layers/src/height_diff_layer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ bool HeightDiffLayer::computeLayer()
104104
{
105105
auto map = map_ptr_.lock();
106106
auto mesh = map->mesh();
107-
height_diff_ = lvr2::calcVertexHeightDifferences(*mesh, config_.radius);
107+
const auto& normals = map->vertexNormals();
108+
height_diff_ = lvr2::calcVertexHeightDifferences(*mesh, normals, config_.radius);
108109
return computeLethals();
109110
}
110111

0 commit comments

Comments
 (0)