Template Function lvr2::calcVertexRoughnessAndHeightDifferences

Function Documentation

template<typename BaseVecT>
void lvr2::calcVertexRoughnessAndHeightDifferences(const BaseMesh<BaseVecT> &mesh, double radius, const VertexMap<Normal<typename BaseVecT::CoordType>> &normals, DenseVertexMap<float> &roughness, DenseVertexMap<float> &heightDiff)

Calculates the roughness and the height difference for each vertex.

This function combines the logic of the calcVertexRoughness- and calcVertexHeightDiff-functions, allowing us to calculate the local neighborhood for each single vertex just once. By that, this function should always be used when the roughness and height difference values are both needed.

Parameters:
  • mesh – The given mesh for the calculation.

  • radius – The radius which defines the local neighborhood. A local neighborhood is defined by a circular-shaped radius, which includes all connected edges and vertices. Once an edge leaves this radius and reenters somehow, it isn’t part of the neighborhood.

  • normals – The vertex normals of the given mesh.

  • roughness – The calculated roughness values for each vertex.

  • heightDiff – The calculated height difference values for each vertex.