ENH: surfaceFeatureExtract now builds with CGAL support for curvature

extendedFeatureEdgeMesh: Add function to find all feature points within a sphere
treeDataPoint: Add support for point overlap test
This commit is contained in:
laurence
2012-03-16 11:21:43 +00:00
parent 23470c19ae
commit dbc7526abb
13 changed files with 1138 additions and 236 deletions

View File

@ -93,6 +93,25 @@ bool Foam::treeDataPoint::overlaps
}
// Check if any point on shape is inside sphere.
bool Foam::treeDataPoint::overlaps
(
const label index,
const point& centre,
const scalar radiusSqr
) const
{
label pointI = (useSubset_ ? pointLabels_[index] : index);
if (magSqr(points_[pointI] - centre) <= radiusSqr)
{
return true;
}
return false;
}
// Calculate nearest point to sample. Updates (if any) nearestDistSqr, minIndex,
// nearestPoint.
void Foam::treeDataPoint::findNearest