Encapsulation of data needed to search for faces. More...
#include <meshTools/treeDataFace.H>
Encapsulation of data needed to search for faces.
Definition at line 57 of file treeDataFace.H.
Public Member Functions | |
ClassName ("treeDataFace") | |
treeDataFace (const bool cacheBb, const primitiveMesh &, const labelList &) | |
Construct from mesh and subset of faces.
| |
treeDataFace (const bool cacheBb, const primitiveMesh &) | |
Construct from mesh. Uses all faces in mesh.
| |
treeDataFace (const bool cacheBb, const polyPatch &) | |
Construct from mesh. Uses all faces in patch.
| |
const labelList & | faceLabels () const |
const primitiveMesh & | mesh () const |
label | size () const |
pointField | points () const |
Get representative point cloud for all shapes inside.
| |
label | getVolumeType (const indexedOctree< treeDataFace > &, 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.
|
treeDataFace | ( | const bool | cacheBb, |
const primitiveMesh & | mesh, | ||
const labelList & | faceLabels | ||
) |
Construct from mesh and subset of faces.
Definition at line 81 of file treeDataFace.C.
treeDataFace | ( | const bool | cacheBb, |
const primitiveMesh & | mesh | ||
) |
Construct from mesh. Uses all faces in mesh.
Definition at line 97 of file treeDataFace.C.
treeDataFace | ( | const bool | cacheBb, |
const polyPatch & | patch | ||
) |
Construct from mesh. Uses all faces in patch.
Definition at line 112 of file treeDataFace.C.
ClassName | ( | "treeDataFace" | ) |
const labelList& faceLabels | ( | ) | const [inline]
|
Definition at line 118 of file treeDataFace.H.
Referenced by patchProbes::findElements(), and meshSearch::findNearestBoundaryFace().
const primitiveMesh& mesh | ( | ) | const [inline]
|
Definition at line 123 of file treeDataFace.H.
label size | ( | ) | const [inline]
|
Definition at line 128 of file treeDataFace.H.
References List< T >::size().
Foam::pointField points | ( | ) | const |
Get representative point cloud for all shapes inside.
(one point per shape)
Definition at line 132 of file treeDataFace.C.
References forAll.
Foam::label getVolumeType | ( | const indexedOctree< treeDataFace > & | oc, |
const point & | sample | ||
) | const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface.
Only makes sense for closed surfaces.
Definition at line 148 of file treeDataFace.C.
References Foam::abort(), e, edge::end(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, indexedOctree< Type >::getSide(), PointHit< Point >::hit(), PointIndexHit< Point >::index(), Foam::mag(), Foam::magSqr(), face::nearestPoint(), pFaces, Foam::Pout, PointHit< Point >::rawPoint(), Foam::sqr(), edge::start(), and Vector< Cmpt >::zero.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 406 of file treeDataFace.C.
References treeBoundBox::contains(), UList< T >::fcIndex(), forAll, triangleFuncs::intersectBb(), and 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 469 of file treeDataFace.C.
References PointHit< Point >::distance(), forAll, face::nearestPoint(), PointHit< Point >::rawPoint(), and Foam::sqr().
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 170 of file treeDataFace.H.
References notImplemented.
Calculate intersection of shape with ray. Sets result.
accordingly
Definition at line 498 of file treeDataFace.C.
References PointHit< Point >::distance(), intersection::HALF_RAY, PointHit< Point >::hit(), PointHit< Point >::hitPoint(), and treeBoundBox::posBits().