76 return cubeBb.
contains(points_[index]);
84 const scalar radiusSqr
87 const point&
p = points_[index];
89 const scalar distSqr =
magSqr(
p - centre);
91 if (distSqr <= radiusSqr)
105 scalar& nearestDistSqr,
112 const label index = indices[i];
114 const point& pt = points_[index];
118 if (distSqr < nearestDistSqr)
120 nearestDistSqr = distSqr;
140 scalar nearestDistSqr =
magSqr(linePoint - nearestPoint);
144 const label index = indices[i];
146 const point& shapePt = points_[index];
154 if (distSqr < nearestDistSqr)
156 nearestDistSqr = distSqr;
159 nearestPoint = shapePt;
163 minPt =
min(
ln.start(),
ln.end());
170 maxPt =
max(
ln.start(),
ln.end());
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Minimal example by using system/controlDict.functions:
int overlaps
Flag to control which overlap calculations are performed.
Describes the interaction of a face and a point. It carries the info of a successful hit and (if succ...
const point_type & rawPoint() const noexcept
The point, no checks.
scalar distance() const noexcept
Return distance to hit.
const Cmpt & z() const
Access to the vector z component.
const Cmpt & y() const
Access to the vector y component.
const Cmpt & x() const
Access to the vector x component.
const point & min() const
Minimum describing the bounding box.
const point & max() const
Maximum describing the bounding box.
Non-pointer based hierarchical recursive searching. Storage is dynamic, so elements can be deleted.
Holds (reference to) pointField. Encapsulation of data needed for octree searches....
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
volumeType getVolumeType(const dynamicIndexedOctree< dynamicTreeDataPoint > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
const DynamicList< point > & shapePoints() const
Get representative point cloud for all shapes inside.
Standard boundBox with extra functionality for use in octree.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
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.