Go to the documentation of this file.
55 Foam::searchableRotatedBox::searchableRotatedBox
83 points_ = transform_.globalPosition(box_.points());
97 return transform_.globalPosition(box_.coordinates());
107 box_.boundingSpheres(centres, radiusSqr);
108 centres = transform_.globalPosition(centres);
145 for (
const edge&
e : edges)
148 if (treeBb.
intersects(points_[
e[0]], points_[
e[1]], inter))
158 for (
const face&
f : fcs)
160 point fc =
f.centre(points_);
162 for (
const edge&
e : edges)
187 const scalar nearestDistSqr
194 transform_.localPosition(sample),
227 transform_.localPosition(start),
228 transform_.localPosition(
end)
244 return findLine(start,
end);
259 info[i] = findNearest(
samples[i], nearestDistSqr[i]);
275 info[i] = findLine(start[i],
end[i]);
291 info[i] = findLineAny(start[i],
end[i]);
319 +
vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
334 while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
344 || (inter.
index() == hits.last().index())
351 pt = inter.
hitPoint() + smallVec[pointI];
358 info[pointI].
clear();
382 box_.getNormal(info, normal);
384 normal = transform_.globalVector(normal);
394 box_.getVolumeType(transform_.localPosition(
points), volType);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label index() const
Return index.
virtual const wordList & regions() const
Names of regions.
const word & name() const
Return name.
bool hit() const
Is there a hit.
virtual tmp< pointField > points() const
Get the points that define the surface.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
bool containsAny(const UList< point > &points) const
Contains any of the points? (inside or on edge)
pointIndexHit findLineAny(const point &start, const point &end) const
Find any intersection of line between start and end.
const fileName & instance() const
Standard boundBox with extra functionality for use in octree.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
bool hit() const
Is there a hit.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
static const edgeList edges
Edge to point addressing.
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< pointField > coordinates() const
Get representative set of element coordinates.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const objectRegistry & db() const
Return the local objectRegistry.
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
const fileName & local() const
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
const Point & rawPoint() const
Return point with no checking.
scalar distance() const
Return distance to hit.
virtual bool overlaps(const boundBox &bb) const
Does any part of the surface overlap the supplied bound box?
writeOption writeOpt() const
The write option.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit >> &) const
Get all intersections in order from start to end.
bool intersects(const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const
Intersects segment; set point to intersection position and face,.
const Point & hitPoint() const
Return hit point.
static const faceList faces
Face to point addressing.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
void clear()
Clear the addressed list, i.e. set the size to zero.
void transfer(List< T > &list)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
pointIndexHit findNearest(const point &sample, const scalar nearestDistSqr) const
Calculate nearest point on surface.
scalarField samples(nIntervals, Zero)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Vector< scalar > vector
A scalar version of the templated Vector.
pointIndexHit findLine(const point &start, const point &end) const
Find nearest intersection of line between start and end.
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
virtual void getVolumeType(const pointField &points, List< volumeType > &volType) const
Determine type (inside/outside/mixed) for point. unknown if.
PointIndexHit< point > pointIndexHit
dimensionedScalar sqrt(const dimensionedScalar &ds)
readOption readOpt() const
The read option.
virtual const wordList & regions() const
Names of regions.
const dimensionedScalar e
Elementary charge.
void clear()
Clear the list, i.e. set size to zero.
A bounding box defined in terms of min/max extrema points.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
A face is a list of labels corresponding to mesh vertices.
void setSize(const label newSize)
Alias for resize(const label)
tmp< pointField > points() const
Corner points in an order corresponding to a 'hex' cell.
defineTypeNameAndDebug(combustionModel, 0)