53 scalar t = lineIntersect(l);
62 info.setPoint(start+t*l.vec());
75 if (
mag(normal()[dir]) - 1 < small)
85 return boundBox(min,
max);
94 const point& basePoint,
99 plane(basePoint, normal)
101 bounds() = calcBounds();
114 bounds() = calcBounds();
128 if (regions_.empty())
131 regions_[0] =
"region0";
144 centres[0] = refPoint();
162 info[i].setPoint(nearestPoint(samples[i]));
164 if (
magSqr(samples[i]-info[i].rawPoint()) > nearestDistSqr[i])
166 info[i].setIndex(-1);
178 void Foam::searchablePlane::findLine
189 info[i] = findLine(start[i], end[i]);
201 findLine(start, end, info);
213 findLine(start, end, nearestInfo);
218 if (nearestInfo[pointi].hit())
221 info[pointi][0] = nearestInfo[pointi];
225 info[pointi].
clear();
260 <<
"Volume type not supported for plane." #define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void size(const label)
Override size to be inconsistent with allocated storage.
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
A bounding box defined in terms of the points at its extremities.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
PointIndexHit< point > pointIndexHit
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
Geometric class that creates a 2D plane and can return the intersection point between a line and the ...
Macros for easy insertion into run-time selection tables.
searchablePlane(const IOobject &io, const point &basePoint, const vector &normal)
Construct from components.
static const direction nComponents
Number of components in this vector space.
line< point, const point & > linePointRef
Line using referred points.
void clear()
Clear the list, i.e. set size to zero.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
virtual ~searchablePlane()
Destructor.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
virtual const wordList & regions() const
Names of regions.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
void setSize(const label)
Reset size of List.
vector point
Point is a vector.
virtual void findLineAny(const pointField &start, const pointField &end, List< pointIndexHit > &) const
Return any intersection on segment from start to end.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual void findNearest(const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual void getVolumeType(const pointField &, List< volumeType > &) const
Determine type (inside/outside/mixed) for point. unknown if.