55Foam::searchableRotatedBox::searchableRotatedBox
77 transform_(csys.origin(), csys.e3(), csys.e1())
79 points_ = transform_.globalPosition(box_.points());
83Foam::searchableRotatedBox::searchableRotatedBox
107 return box_.regions();
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_);
184 if (inter.hit() && inter.distance() <= 1)
198 const scalar nearestDistSqr
205 transform_.localPosition(sample),
210 boxNearest.point() = transform_.globalPosition(boxNearest.point());
238 transform_.localPosition(start),
239 transform_.localPosition(end)
243 boxHit.point() = transform_.globalPosition(boxHit.point());
279 List<pointIndexHit>& info
282 info.setSize(start.size());
295 List<pointIndexHit>& info
298 info.setSize(start.size());
311 List<List<pointIndexHit>>& info
314 info.setSize(start.size());
317 DynamicList<pointIndexHit> hits;
330 +
vector(ROOTVSMALL,ROOTVSMALL,ROOTVSMALL)
343 point pt = inter.point() + smallVec[pointI];
345 while (((pt-start[pointI])&dirVec[pointI]) <= magSqrDirVec[pointI])
355 || (inter.index() == hits.last().index())
362 pt = inter.point() + smallVec[pointI];
365 info[pointI].transfer(hits);
369 info[pointI].clear();
381 region.setSize(
info.size());
393 box_.getNormal(
info, normal);
395 normal = transform_.globalVector(normal);
405 box_.getVolumeType(transform_.localPosition(
points), volType);
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
void append(const T &val)
Copy append an element to the end of this list.
Minimal example by using system/controlDict.functions:
readOption readOpt() const noexcept
Get the read option.
writeOption writeOpt() const noexcept
Get the write option.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const objectRegistry & db() const noexcept
Return the local objectRegistry.
InfoProxy< IOobject > info() const noexcept
Return info proxy, for printing information to a stream.
const fileName & local() const noexcept
Read access to local path component.
const fileName & instance() const noexcept
Read access to instance path component.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
scalar distance() const noexcept
Return distance to hit.
bool hit() const noexcept
Is there a hit.
label index() const noexcept
Return the hit index.
bool hit() const noexcept
Is there a hit?
const point_type & point() const noexcept
Return point, no checks.
void size(const label n)
Older name for setAddressableSize.
T & last()
Access last element of the list, position [size()-1].
A bounding box defined in terms of min/max extrema points.
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
tmp< pointField > points() const
Corner points in an order corresponding to a 'hex' cell.
bool containsAny(const UList< point > &points) const
Contains any of the points? (inside or on edge).
A Cartesian coordinate system.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A face is a list of labels corresponding to mesh vertices.
Searching on a rotated box.
virtual void findLineAll(const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
Get all intersections in order from start to end.
virtual bool overlaps(const boundBox &bb) const
Does any part of the surface overlap the supplied bound box?
pointIndexHit findNearest(const point &sample, const scalar nearestDistSqr) const
Calculate nearest point on surface.
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.
virtual void getNormal(const List< pointIndexHit > &, vectorField &normal) const
From a set of points and indices get the normal.
pointIndexHit findLine(const point &start, const point &end) const
Find nearest intersection of line between start and end.
virtual void getRegion(const List< pointIndexHit > &, labelList ®ion) const
From a set of points and indices get the region.
virtual const wordList & regions() const
Names of regions.
virtual tmp< pointField > coordinates() const
Get representative set of element coordinates.
pointIndexHit findLineAny(const point &start, const point &end) const
Find any intersection of line between start and end.
virtual tmp< pointField > points() const
Get the points that define the surface.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual const boundBox & bounds() const
Return const reference to boundBox.
A class for managing temporary objects.
Standard boundBox with extra functionality for use in octree.
static const edgeList edges
Edge to point addressing, using octant corner points.
static const faceList faces
Face to point addressing, using octant corner points.
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,.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Namespace for bounding specifications. At the moment, mostly for tables.
Namespace for coordinate systems.
List< word > wordList
List of word.
PointHit< point > pointHit
A PointHit with a 3D point.
List< label > labelList
A List of labels.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar sqrt(const dimensionedScalar &ds)
line< point, const point & > linePointRef
A line using referred points.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
#define forAll(list, i)
Loop across all elements in list.
scalarField samples(nIntervals, Zero)