74 return cubeBb.
contains(points_[index]);
82 const scalar radiusSqr
85 const point&
p = points_[index];
87 const scalar distSqr =
magSqr(
p - centre);
89 if (distSqr <= radiusSqr)
103 scalar& nearestDistSqr,
110 const label index = indices[i];
112 const point& pt = points_[index];
114 scalar distSqr =
magSqr(pt - sample);
116 if (distSqr < nearestDistSqr)
118 nearestDistSqr = distSqr;
138 scalar nearestDistSqr =
magSqr(linePoint - nearestPoint);
142 const label index = indices[i];
144 const point& shapePt = points_[index];
152 if (distSqr < nearestDistSqr)
154 nearestDistSqr = distSqr;
157 nearestPoint = shapePt;
161 minPt =
min(
ln.start(),
ln.end());
168 maxPt =
max(
ln.start(),
ln.end());
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
scalar distance() const
Return distance to hit.
const Point & rawPoint() const
Return point with no checking.
const point & min() const
Minimum point defining the bounding box.
const point & max() const
Maximum point defining 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....
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
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.
dynamicTreeDataPoint(const DynamicList< point > &points)
Construct from List. Holds reference!
Standard boundBox + extra functionality for use in octree.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.