43 #ifndef Foam_treeDataPoint_H 44 #define Foam_treeDataPoint_H 57 template<
class Type>
class indexedOctree;
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,
bool useSubset() const noexcept
Use a subset of points.
void size(const label n)
Older name for setAddressableSize.
const point & operator[](const label index) const
Point at specified shape index.
Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense.
const pointField & points() const noexcept
The original point field.
Forward to treeDataPoint findNearest operations.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
bool overlaps(const label index, const treeBoundBox &searchBox) const
Does (bb of) shape at index searchBox.
An enumeration wrapper for classification of a location as being inside/outside of a volume...
label objectIndex(const label index) const
Map to the original (non-subset) point label.
const point & centre(const label index) const
Point at specified shape index.
tmp< pointField > centres() const
Point cloud.
bool empty() const noexcept
Is the effective point field empty?
findNearestOp(const indexedOctree< treeDataPoint > &tree)
treeDataPoint(const pointField &points)
Construct from pointField.
Tree tree(triangles.begin(), triangles.end())
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
OBJstream os(runTime.globalPath()/outputName)
findIntersectOp(const indexedOctree< treeDataPoint > &tree)
treeBoundBox bounds(const labelUList &indices) const
Return bounding box for the specified point indices.
volumeType getVolumeType(const indexedOctree< treeDataPoint > &os, const point &sample) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Forward to treeDataPoint findIntersect operations (not possible)
Non-pointer based hierarchical recursive searching.
label size() const noexcept
The size of the effective point field.
label pointLabel(label index) const
Map to the original (non-subset) point label.
ClassNameNoDebug("treeDataPoint")
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
Standard boundBox with extra functionality for use in octree.
List< label > labelList
A List of labels.
A class for managing temporary objects.
int nDim() const noexcept
Object dimension == 0 (point element)
const labelList & pointLabels() const noexcept
The subset of point ids to use.