Skip to content
Snippets Groups Projects
Commit 7a12eaf8 authored by David Gobbi's avatar David Gobbi
Browse files

Fix point weights in vtkCenterOfMass

The tuple, component indices into the weight array were reversed.
parent 6637fd6c
No related branches found
No related tags found
2 merge requests!11541Branch for the v9.4.0 release,!11432Fixes for array access beyond MaxId
......@@ -46,7 +46,7 @@ void vtkCenterOfMass::ComputeCenterOfMass(
double point[3];
points->GetPoint(i, point);
double weight = scalars->GetComponent(0, i);
double weight = scalars->GetComponent(i, 0);
weightTotal += weight;
vtkMath::MultiplyScalar(point, weight);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment