Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping). More...
#include <meshTools/treeDataCell.H>
Encapsulation of data needed to search in/for cells. Used to find the cell containing a point (e.g. cell-cell mapping).
Definition at line 54 of file treeDataCell.H.
Public Member Functions | |
ClassName ("treeDataCell") | |
treeDataCell (const bool cacheBb, const primitiveMesh &, const labelList &) | |
Construct from mesh and subset of cells.
| |
treeDataCell (const bool cacheBb, const primitiveMesh &) | |
Construct from mesh. Uses all cells in mesh.
| |
const labelList & | cellLabels () const |
const primitiveMesh & | mesh () const |
label | size () const |
pointField | points () const |
Get representative point cloud for all shapes inside.
| |
label | getVolumeType (const indexedOctree< treeDataCell > &, const point &) const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
| |
bool | overlaps (const label index, const treeBoundBox &sampleBb) const |
Does (bb of) shape at index overlap bb.
| |
void | findNearest (const labelList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
Calculates nearest (to sample) point in shape.
| |
void | findNearest (const labelList &indices, const linePointRef &ln, treeBoundBox &tightest, label &minIndex, point &linePoint, point &nearestPoint) const |
Calculates nearest (to line) point in shape.
| |
bool | intersects (const label index, const point &start, const point &end, point &result) const |
Calculate intersection of shape with ray. Sets result.
|
treeDataCell | ( | const bool | cacheBb, |
const primitiveMesh & | mesh, | ||
const labelList & | cellLabels | ||
) |
Construct from mesh and subset of cells.
Definition at line 71 of file treeDataCell.C.
References forAll.
treeDataCell | ( | const bool | cacheBb, |
const primitiveMesh & | mesh | ||
) |
Construct from mesh. Uses all cells in mesh.
Definition at line 94 of file treeDataCell.C.
References forAll.
ClassName | ( | "treeDataCell" | ) |
const labelList& cellLabels | ( | ) | const [inline]
|
Definition at line 99 of file treeDataCell.H.
const primitiveMesh& mesh | ( | ) | const [inline]
|
Definition at line 104 of file treeDataCell.H.
label size | ( | ) | const [inline]
|
Definition at line 110 of file treeDataCell.H.
References List< T >::size().
Foam::pointField points | ( | ) | const |
Get representative point cloud for all shapes inside.
(one point per shape)
Definition at line 117 of file treeDataCell.C.
References forAll.
label getVolumeType | ( | const indexedOctree< treeDataCell > & | , |
const point & | |||
) | const [inline]
|
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 125 of file treeDataCell.H.
References notImplemented.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 132 of file treeDataCell.C.
References treeBoundBox::overlaps().
void findNearest | ( | const labelList & | indices, |
const point & | sample, | ||
scalar & | nearestDistSqr, | ||
label & | nearestIndex, | ||
point & | nearestPoint | ||
) | const |
Calculates nearest (to sample) point in shape.
Returns actual point and distance (squared)
Definition at line 151 of file treeDataCell.C.
References forAll, and Foam::magSqr().
void findNearest | ( | const labelList & | indices, |
const linePointRef & | ln, | ||
treeBoundBox & | tightest, | ||
label & | minIndex, | ||
point & | linePoint, | ||
point & | nearestPoint | ||
) | const [inline]
|
Calculates nearest (to line) point in shape.
Returns point and distance (squared)
Definition at line 160 of file treeDataCell.H.
References notImplemented.
Calculate intersection of shape with ray. Sets result.
accordingly
Definition at line 177 of file treeDataCell.C.
References PointHit< Point >::distance(), forAll, intersection::HALF_RAY, PointHit< Point >::hit(), PointHit< Point >::hitPoint(), Foam::magSqr(), treeBoundBox::posBits(), face::ray(), intersection::setPlanarTol(), and Foam::sqr().