43#ifndef Foam_treeDataPoint_H
44#define Foam_treeDataPoint_H
74 const bool useSubset_;
93 scalar& nearestDistSqr,
125 point& intersectionPoint
146 const bool useSubsetPoints =
true
155 const bool useSubsetPoints =
true
182 return useSubset_ ? pointLabels_.empty() : points_.empty();
188 return useSubset_ ? pointLabels_.
size() : points_.
size();
194 return useSubset_ && index >= 0 ? pointLabels_[index] : index;
235 const scalar radiusSqr
245 scalar& nearestDistSqr,
Minimal example by using system/controlDict.functions:
void size(const label n)
Older name for setAddressableSize.
Non-pointer based hierarchical recursive searching.
A class for managing temporary objects.
Standard boundBox with extra functionality for use in octree.
Forward to treeDataPoint findIntersect operations (not possible).
findIntersectOp(const indexedOctree< treeDataPoint > &tree)
Forward to treeDataPoint findNearest operations.
findNearestOp(const indexedOctree< treeDataPoint > &tree)
bool useSubset() const noexcept
Use a subset of points.
tmp< pointField > centres() const
Point cloud.
treeDataPoint(const pointField &points)
Construct from pointField.
ClassNameNoDebug("treeDataPoint")
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
bool empty() const noexcept
Is the effective point field empty?
int nDim() const noexcept
Object dimension == 0 (point element).
const point & centre(const label index) const
Point at specified shape index.
label objectIndex(const label index) const
Map to the original (non-subset) point label.
label pointLabel(label index) const
Map to the original (non-subset) point label.
const point & operator[](const label index) const
Point at specified shape index.
const pointField & points() const noexcept
The original point field.
volumeType getVolumeType(const indexedOctree< treeDataPoint > &os, const point &sample) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
label size() const noexcept
The size of the effective point field.
bool overlaps(const label index, const treeBoundBox &searchBox) const
Does (bb of) shape at index searchBox.
const labelList & pointLabels() const noexcept
The subset of point ids to use.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
#define ClassNameNoDebug(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)
Namespace for bounding specifications. At the moment, mostly for tables.
List< label > labelList
A List of labels.
line< point, const point & > linePointRef
A line using referred points.
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
Tree tree(triangles.begin(), triangles.end())