mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Add findSphere to dynamicTreeDataPoint
This commit is contained in:
@ -75,6 +75,27 @@ bool Foam::dynamicTreeDataPoint::overlaps
|
||||
}
|
||||
|
||||
|
||||
// Check if any point on shape is inside sphere.
|
||||
bool Foam::dynamicTreeDataPoint::overlaps
|
||||
(
|
||||
const label index,
|
||||
const point& centre,
|
||||
const scalar radiusSqr
|
||||
) const
|
||||
{
|
||||
const point& p = points_[index];
|
||||
|
||||
const scalar distSqr = magSqr(p - centre);
|
||||
|
||||
if (distSqr <= radiusSqr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Calculate nearest point to sample. Updates (if any) nearestDistSqr, minIndex,
|
||||
// nearestPoint.
|
||||
void Foam::dynamicTreeDataPoint::findNearest
|
||||
|
||||
Reference in New Issue
Block a user