Skip to content
Snippets Groups Projects
Commit eef0fd0a authored by Ye Han's avatar Ye Han
Browse files

BUG: Fix mismatch between point-capsule CD and vtkSource

parent c5058d67
No related branches found
No related tags found
No related merge requests found
......@@ -254,9 +254,9 @@ pointToCapsule(const Vec3r& point, uint32_t pointIdx, Capsule* const capsule,
// Get position of end points of the capsule
// TODO: Fix this issue of extra computation in future
const Vec3d p0 = capsulePos;
const Vec3d p1 = p0 + capsule->getOrientationAxis() * length;
const Vec3d mid = 0.5 * (p0 + p1);
const Vec3d mid = capsulePos;
const Vec3d p1 = mid + 0.5 * capsule->getOrientationAxis() * length;
const Vec3d p0 = 2 * mid - p1;
const Vec3d p = p1 - p0;
const auto pDotp = p.dot(p);
const auto pDotp0 = p.dot(p0);
......
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