Skip to content
Snippets Groups Projects
Commit eb33b795 authored by Sergio Ferraris's avatar Sergio Ferraris Committed by Andrew Heather
Browse files

BUG: Correction to tgtPointFace srcPointFace member functions

parent 5bc84655
Branches
Tags
1 merge request!406ENH: MPPIC dynamic mesh
...@@ -1073,7 +1073,7 @@ const ...@@ -1073,7 +1073,7 @@ const
if (ray.hit()) if (ray.hit())
{ {
// tgtPoint = ray.rawPoint(); tgtPoint = ray.rawPoint();
return srcFacei; return srcFacei;
} }
else if (ray.distance() < nearest.distance()) else if (ray.distance() < nearest.distance())
...@@ -1085,7 +1085,7 @@ const ...@@ -1085,7 +1085,7 @@ const
if (nearest.hit() || nearest.eligibleMiss()) if (nearest.hit() || nearest.eligibleMiss())
{ {
// tgtPoint = nearest.rawPoint(); tgtPoint = nearest.rawPoint();
return nearestFacei; return nearestFacei;
} }
...@@ -1118,21 +1118,23 @@ const ...@@ -1118,21 +1118,23 @@ const
pointHit ray = f.ray(srcPoint, n, tgtPoints); pointHit ray = f.ray(srcPoint, n, tgtPoints);
if (ray.hit() || ray.eligibleMiss()) if (ray.hit())
{ {
// srcPoint = ray.rawPoint(); srcPoint = ray.rawPoint();
return tgtFacei; return tgtFacei;
} }
else if (ray.distance() < nearest.distance()) const pointHit near = f.nearestPoint(srcPoint, tgtPoints);
if (near.distance() < nearest.distance())
{ {
nearest = ray; nearest = near;
nearestFacei = tgtFacei; nearestFacei = tgtFacei;
} }
} }
if (nearest.hit() || nearest.eligibleMiss()) if (nearest.hit() || nearest.eligibleMiss())
{ {
// srcPoint = nearest.rawPoint(); srcPoint = nearest.rawPoint();
return nearestFacei; return nearestFacei;
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment