38#ifndef Foam_treeDataFace_H
39#define Foam_treeDataFace_H
80 const bool useSubset_;
92 inline bool usesFace(
const label facei)
const;
116 scalar& nearestDistSqr,
288 return useSubset_ ? faceLabels_.empty() : !mesh_.nFaces();
294 return useSubset_ ? faceLabels_.size() : mesh_.nFaces();
300 return useSubset_ && index >= 0 ? faceLabels_[index] : index;
304 const face&
operator[](
const label index)
const
317 tmp<pointField>
centres()
const;
342 const scalar radiusSqr
352 scalar& nearestDistSqr,
Minimal example by using system/controlDict.functions:
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A face is a list of labels corresponding to mesh vertices.
Non-pointer based hierarchical recursive searching.
A range or interval of labels defined by a start and a size.
A patch is a list of labels that address the faces in the global face list.
Cell-face mesh analysis engine.
A class for managing temporary objects.
Standard boundBox with extra functionality for use in octree.
findIntersectOp(const indexedOctree< treeDataFace > &tree)
findNearestOp(const indexedOctree< treeDataFace > &tree)
Encapsulation of data for searching on faces.
bool useSubset() const noexcept
Use a subset of faces.
tmp< pointField > centres() const
Representative point cloud for contained shapes. One point per shape, corresponding to the face centr...
const labelList & faceLabels() const noexcept
The subset of face ids to use.
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 face selection empty?
int nDim() const noexcept
Object dimension == 2 (face element).
treeDataFace(const primitiveMesh &mesh, const labelUList &faceLabels)
Construct from mesh, copying subset of faces.
static treeBoundBox bounds(const primitiveMesh &mesh, const labelRange &range)
Return bounding box of specified range of faces.
const point & centre(const label index) const
Representative point (face centre) at shape index.
label objectIndex(const label index) const
Map from shape index to original (non-subset) face label.
treeDataFace(const primitiveMesh &mesh, const labelRange &range)
Construct from mesh, using specified range of faces.
treeDataFace(const bool cacheBb, const primitiveMesh &mesh)
Construct from mesh, using all faces.
treeDataFace(const primitiveMesh &mesh, labelList &&faceLabels)
Construct from mesh, moving subset of faces.
treeDataFace(const polyPatch &patch)
Construct from mesh, using polyPatch faces.
ClassName("treeDataFace")
volumeType getVolumeType(const indexedOctree< treeDataFace > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
label size() const noexcept
The size of the face selection.
treeDataFace(const primitiveMesh &mesh)
Construct from mesh, using all faces.
static treeBoundBoxList boxes(const primitiveMesh &mesh)
Calculate and return bounding boxes for all mesh faces.
const primitiveMesh & mesh() const noexcept
Reference to the supporting mesh.
bool overlaps(const label index, const treeBoundBox &searchBox) const
Does (bb of) shape at index overlap searchBox.
const face & operator[](const label index) const
Face at specified shape index.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Namespace for bounding specifications. At the moment, mostly for tables.
List< label > labelList
A List of labels.
List< treeBoundBox > treeBoundBoxList
A List of treeBoundBox.
line< point, const point & > linePointRef
A line using referred points.
vector point
Point is a vector.
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())