ENH: searchableSurface: extended api for getting nearest and normal

This commit is contained in:
mattijs
2012-06-15 13:23:26 +01:00
parent 616b3c8273
commit 048b414ad3
2 changed files with 30 additions and 2 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,4 +95,21 @@ Foam::searchableSurface::~searchableSurface()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::searchableSurface::findNearest
(
const pointField& sample,
const scalarField& nearestDistSqr,
List<pointIndexHit>& info,
vectorField& normal,
labelList& region
) const
{
findNearest(sample, nearestDistSqr, info);
getNormal(info, normal);
getRegion(info, region);
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -323,6 +323,17 @@ public:
List<volumeType>&
) const = 0;
//- Find nearest, normal and region. Can be overridden with
// optimised implementation
virtual void findNearest
(
const pointField& sample,
const scalarField& nearestDistSqr,
List<pointIndexHit>&,
vectorField& normal,
labelList& region
) const;
// Other