Skip to content

Commit

Permalink
Merge topic 'SignedDistanceInsideOutside'
Browse files Browse the repository at this point in the history
66eb8ef ENH: Signed distance, inside negative, outside positive

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2345
  • Loading branch information
lorensen authored and kwrobot committed Jan 20, 2017
2 parents 52bafd5 + 66eb8ef commit 7918356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Filters/Points/vtkSignedDistance.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct SignedDistance
{
p = this->Pts + 3*pIds->GetId(ii);
n = this->Normals + 3*pIds->GetId(ii);
dist += n[0]*(x[0]-p[0]) + n[1]*(x[1]-p[1]) + n[2]*(x[2]-p[2]);
dist += n[0]*(p[0]-x[0]) + n[1]*(p[1]-x[1]) + n[2]*(p[2]-x[2]);
}
this->Scalars[ptId] = dist / static_cast<double>(numPts);
}//if nearby points
Expand Down

0 comments on commit 7918356

Please sign in to comment.