Go to the documentation of this file.
77 return cubeBb.
contains(points_[index]);
86 const scalar radiusSqr
89 const point&
p = points_[index];
91 const scalar distSqr =
magSqr(
p - centre);
93 if (distSqr <= radiusSqr)
109 scalar& nearestDistSqr,
116 const label index = indices[i];
118 const point& pt = points_[index];
120 scalar distSqr =
magSqr(pt - sample);
122 if (distSqr < nearestDistSqr)
124 nearestDistSqr = distSqr;
146 scalar nearestDistSqr =
magSqr(linePoint - nearestPoint);
150 const label index = indices[i];
152 const point& shapePt = points_[index];
160 if (distSqr < nearestDistSqr)
162 nearestDistSqr = distSqr;
165 nearestPoint = shapePt;
169 minPt =
min(
ln.start(),
ln.end());
176 maxPt =
max(
ln.start(),
ln.end());
const point & max() const
Maximum describing the bounding box.
#define forAll(list, i)
Loop across all elements in list.
This class describes the interaction of a face and a point. It carries the info of a successful hit a...
const DynamicList< point > & points_
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
const Point & rawPoint() const
Return point with no checking.
Standard boundBox + extra functionality for use in octree.
const DynamicList< point > & shapePoints() const
Get representative point cloud for all shapes inside.
bool overlaps(const label index, const treeBoundBox &sampleBb) const
Does (bb of) shape at index overlap bb.
Non-pointer based hierarchical recursive searching. Storage is dynamic, so elements can be deleted.
scalar distance() const
Return distance to hit.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const point & min() const
Minimum describing the bounding box.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
volumeType getVolumeType(const dynamicIndexedOctree< dynamicTreeDataPoint > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dynamicTreeDataPoint(const DynamicList< point > &points)
Construct from List. Holds reference!
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
dimensioned< scalar > magSqr(const dimensioned< Type > &)