Go to the documentation of this file.
55 Foam::searchableRotatedBox::searchableRotatedBox
77 transform_(csys.
origin(), csys.
e3(), csys.
e1())
79 points_ = transform_.globalPosition(box_.points());
83 Foam::searchableRotatedBox::searchableRotatedBox
113 return transform_.globalPosition(box_.coordinates());
123 box_.boundingSpheres(centres, radiusSqr);
124 centres = transform_.globalPosition(centres);
159 if (treeBb.
intersects(points_[
e[0]], points_[
e[1]], inter))
171 const point fc =
f.centre(points_);
198 const scalar nearestDistSqr
205 transform_.localPosition(
sample),
238 transform_.localPosition(start),
239 transform_.localPosition(
end)
255 return findLine(start,
end);
270 info[i] = findNearest(
samples[i], nearestDistSqr[i]);
286 info[i] = findLine(start[i],
end[i]);
302 info[i] = findLineAny(start[i],
end[i]);
330 +
vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
345 while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
355 || (inter.
index() == hits.last().index())
362 pt = inter.
hitPoint() + smallVec[pointI];
369 info[pointI].
clear();
393 box_.getNormal(info, normal);
395 normal = transform_.globalVector(normal);
405 box_.getVolumeType(transform_.localPosition(
points), volType);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual const vector e3() const
The local Cartesian z-axis in global coordinates.
virtual const wordList & regions() const
Names of regions.
virtual tmp< pointField > points() const
Get the points that define the surface.
const fileName & instance() const noexcept
A class for managing temporary objects.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
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.
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...
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
scalar distance() const noexcept
Return distance to hit.
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.
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
writeOption writeOpt() const noexcept
The write option.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
#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)
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
virtual const point & origin() const
Return origin.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool hit() const noexcept
Is there a hit?
virtual bool overlaps(const boundBox &bb) const
Does any part of the surface overlap the supplied bound box?
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 fileName & local() const noexcept
static const faceList faces
Face to point addressing.
void setSize(const label n)
Alias for resize()
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 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,...
const point_type & rawPoint() const noexcept
The point, no checks. Same as point()
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.
readOption readOpt() const noexcept
The read option.
virtual void boundingSpheres(pointField ¢res, scalarField &radiusSqr) const
Get bounding spheres (centre and radius squared), one per element.
const word & name() const noexcept
Return name.
virtual void getVolumeType(const pointField &points, List< volumeType > &volType) const
Determine type (inside/outside/mixed) for point. unknown if.
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
A Cartesian coordinate system.
Searching on a rotated box.
dimensionedScalar sqrt(const dimensionedScalar &ds)
label index() const noexcept
Return the hit index.
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.
virtual const vector e1() const
The local Cartesian x-axis in global coordinates.
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.
tmp< pointField > points() const
Corner points in an order corresponding to a 'hex' cell.
defineTypeNameAndDebug(combustionModel, 0)
bool hit() const noexcept
Is there a hit.
Minimal example by using system/controlDict.functions:
const objectRegistry & db() const noexcept
Return the local objectRegistry.