51 vector(GREAT, GREAT, GREAT),
52 vector(-GREAT, -GREAT, -GREAT)
55 const cell& cFaces =
cells[celli];
59 const face&
f = faces[cFaces[cFacei]];
65 cellBb.min() =
min(cellBb.min(),
p);
66 cellBb.max() =
max(cellBb.max(),
p);
73void Foam::treeDataCell::update()
77 bbs_.setSize(cellLabels_.size());
81 bbs_[i] = calcCellBb(cellLabels_[i]);
98 cellLabels_(cellLabels),
100 decompMode_(decompMode)
115 cellLabels_(std::move(cellLabels)),
117 decompMode_(decompMode)
131 cellLabels_(
identity(mesh_.nCells())),
133 decompMode_(decompMode)
180 return cubeBb.
overlaps(bbs_[index]);
183 return cubeBb.
overlaps(calcCellBb(cellLabels_[index]));
202 scalar& nearestDistSqr,
211 label index = indices[i];
215 if (distSqr < nearestDistSqr)
217 nearestDistSqr = distSqr;
245 point& intersectionPoint
263 const treeBoundBox cellBb = shape.calcCellBb(shape.cellLabels_[index]);
279 const cell& cFaces = shape.mesh_.
cells()[shape.cellLabels_[index]];
281 const vector dir(end - start);
282 scalar minDistSqr =
magSqr(dir);
287 const face&
f = shape.mesh_.
faces()[cFaces[i]];
303 intersectionPoint = inter.
hitPoint();
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...
scalar distance() const noexcept
Return distance to hit.
bool hit() const noexcept
Is there a hit.
const point_type & hitPoint() const
Return the hit point. Fatal if not hit.
void size(const label n)
Older name for setAddressableSize.
A cell is defined as a list of faces with extra functionality.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A face is a list of labels corresponding to mesh vertices.
Non-pointer based hierarchical recursive searching.
static scalar setPlanarTol(const scalar t)
Set the planar tolerance, returning the previous value.
Mesh consisting of general polyhedral cells.
cellDecomposition
Enumeration defining the decomposition of the cell for.
virtual const faceList & faces() const
Return raw faces.
bool pointInCell(const point &p, label celli, const cellDecomposition=CELL_TETS) const
Test if point p is in the celli.
virtual const pointField & points() const
Return raw points.
const vectorField & cellCentres() const
const cellList & cells() const
Standard boundBox with extra functionality for use in octree.
bool overlaps(const boundBox &bb) const
Overlaps other bounding box?
direction posBits(const point &pt) const
Position of point relative to bounding box.
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e....
const polyMesh & mesh() const
bool contains(const label index, const point &sample) const
Does shape at index contain sample.
const labelList & cellLabels() const
pointField shapePoints() const
Get representative point cloud for all shapes inside.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#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.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
List< cell > cellList
A List of cells.
vectorField pointField
pointField is a vectorField.
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.
List< face > faceList
A List of faces.
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.