43 const edge&
e = edges_[edgeI];
45 const point& p1 = points_[
e[1]];
51void Foam::treeDataEdge::update()
55 bbs_.setSize(edgeLabels_.size());
59 bbs_[i] = calcBb(edgeLabels_[i]);
77 edgeLabels_(edgeLabels),
94 edgeLabels_(std::move(edgeLabels)),
125 const edge&
e = edges_[edgeLabels_[i]];
127 eMids[i] =
e.centre(points_);
149 const edge&
e = edges_[edgeLabels_[index]];
151 const point& start = points_[
e.start()];
156 return cubeBb.
intersects(start, end, intersect);
164 const scalar radiusSqr
167 const edge&
e = edges_[edgeLabels_[index]];
169 const pointHit nearHit =
e.line(points_).nearestDist(centre);
173 return (distSqr <= radiusSqr);
182 scalar& nearestDistSqr,
189 for (
const label index : indices)
197 if (distSqr < nearestDistSqr)
199 nearestDistSqr = distSqr;
221 scalar nearestDistSqr =
magSqr(linePoint - nearestPoint);
223 for (
const label index : indices)
231 scalar dist =
e.line(shape.
points()).nearestDist(
ln, ePoint, lnPt);
232 scalar distSqr =
sqr(dist);
234 if (distSqr < nearestDistSqr)
236 nearestDistSqr = distSqr;
239 nearestPoint = ePoint;
243 minPt =
min(
ln.start(),
ln.end());
250 maxPt =
max(
ln.start(),
ln.end());
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.
iterator end() noexcept
Return an iterator to end traversing the UList.
void size(const label n)
Older name for setAddressableSize.
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.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
Non-pointer based hierarchical recursive searching.
Standard boundBox with extra functionality for use in octree.
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,.
Holds data for octree to work on an edges subset.
const edgeList & edges() const
const labelList & edgeLabels() const
volumeType getVolumeType(const indexedOctree< treeDataEdge > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
pointField shapePoints() const
const pointField & points() const
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.
const volScalarField & p0
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
vector point
Point is a vector.
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.