39 #ifndef Foam_treeDataCell_H 40 #define Foam_treeDataCell_H 52 template<
class Type>
class indexedOctree;
69 const bool useSubset_;
105 scalar& nearestDistSqr,
136 point& intersectionPoint
261 return useSubset_ ? cellLabels_.
empty() : !mesh_.
nCells();
267 return useSubset_ ? cellLabels_.
size() : mesh_.
nCells();
273 return useSubset_ && index >= 0 ? cellLabels_[index] : index;
326 scalar& nearestDistSqr,
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The size of the cell selection.
tmp< pointField > centres() const
Representative point cloud for contained shapes. One point per shape, corresponding to the cell centr...
Cell-face mesh analysis engine.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
const polyMesh & 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.
An enumeration wrapper for classification of a location as being inside/outside of a volume...
static treeBoundBoxList boxes(const primitiveMesh &mesh)
Calculate and return bounding boxes for all mesh cells.
cellDecomposition
Enumeration defining the decomposition of the cell for.
ClassNameNoDebug("treeDataCell")
findIntersectOp(const indexedOctree< treeDataCell > &tree)
const labelList & cellLabels() const noexcept
The subset of cell ids to use.
Tree tree(triangles.begin(), triangles.end())
volumeType getVolumeType(const indexedOctree< treeDataCell > &, const point &) const
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
static treeBoundBox bounds(const primitiveMesh &mesh, const labelUList &cellIds)
Return bounding box of specified mesh cells.
void findNearest(const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const
Calculates nearest (to sample) point in shape.
const vectorField & cellCentres() const
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
const point & centre(const label index) const
Representative point (cell centre) at shape index.
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.
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e...
treeDataCell(const bool cacheBb, const polyMesh &mesh, polyMesh::cellDecomposition decompMode)
Construct from mesh, using all cells in mesh.
bool empty() const noexcept
Is the effective cell selection empty?
polyMesh::cellDecomposition decompMode() const noexcept
The cell decomposition mode used.
findNearestOp(const indexedOctree< treeDataCell > &tree)
Non-pointer based hierarchical recursive searching.
label objectIndex(const label index) const
Map from shape index to original (non-subset) cell label.
label nCells() const noexcept
Number of mesh cells.
Standard boundBox with extra functionality for use in octree.
int nDim() const noexcept
Object dimension == 3 (volume element)
Mesh consisting of general polyhedral cells.
List< label > labelList
A List of labels.
A class for managing temporary objects.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
bool contains(const label index, const point &sample) const
Does shape at index contain sample.
bool useSubset() const noexcept
Use a subset of cells.