towr icon indicating copy to clipboard operation
towr copied to clipboard

A small bug in HeightMap::GetDerivativeOfNormalizedBasisWrt()

Open caoweiquan322 opened this issue 2 years ago • 0 comments

Hello,

I believe I found a bug in HeightMap::GetDerivativeOfNormalizedBasisWrt().

The code below

Vector3d dn_norm_wrt_n = GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(v, dim);
return dn_norm_wrt_n.cwiseProduct(dv_wrt_dim);

should be replaced by

  Eigen::Matrix3d dn_norm_wrt_n;
  dn_norm_wrt_n << GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(v, 0),
                   GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(v, 1),
                   GetDerivativeOfNormalizedVectorWrtNonNormalizedIndex(v, 2);
  return dn_norm_wrt_n * dv_wrt_dim;

Am I correct? Please confirm. Thanks.

caoweiquan322 avatar Apr 12 '22 05:04 caoweiquan322