Encapsulation of data for searching on faces. More...
#include <treeDataFace.H>
Classes | |
| class | findNearestOp |
| class | findIntersectOp |
Public Member Functions | |
| ClassName ("treeDataFace") | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh) | |
| Construct from mesh, using all faces. | |
| treeDataFace (const bool cacheBb, const polyPatch &patch) | |
| Construct from mesh, using polyPatch faces. | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelRange &range) | |
| Construct from mesh, using specified range of faces. | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, const labelUList &faceLabels) | |
| Construct from mesh, copying subset of faces. | |
| treeDataFace (const bool cacheBb, const primitiveMesh &mesh, labelList &&faceLabels) | |
| Construct from mesh, moving subset of faces. | |
| treeDataFace (const primitiveMesh &mesh) | |
| Construct from mesh, using all faces. | |
| treeDataFace (const polyPatch &patch) | |
| Construct from mesh, using polyPatch faces. | |
| treeDataFace (const primitiveMesh &mesh, const labelRange &range) | |
| Construct from mesh, using specified range of faces. | |
| treeDataFace (const primitiveMesh &mesh, const labelUList &faceLabels) | |
| Construct from mesh, copying subset of faces. | |
| treeDataFace (const primitiveMesh &mesh, labelList &&faceLabels) | |
| Construct from mesh, moving subset of faces. | |
| int | nDim () const noexcept |
| Object dimension == 2 (face element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified face indices. | |
| const primitiveMesh & | mesh () const noexcept |
| Reference to the supporting mesh. | |
| const labelList & | faceLabels () const noexcept |
| The subset of face ids to use. | |
| bool | useSubset () const noexcept |
| Use a subset of faces. | |
| bool | empty () const noexcept |
| Is the effective face selection empty? | |
| label | size () const noexcept |
| The size of the face selection. | |
| label | objectIndex (const label index) const |
| Map from shape index to original (non-subset) face label. | |
| const face & | operator[] (const label index) const |
| Face at specified shape index. | |
| const point & | centre (const label index) const |
| Representative point (face centre) at shape index. | |
| tmp< pointField > | centres () const |
| Representative point cloud for contained shapes. One point per shape, corresponding to the face centres. | |
| volumeType | 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 &searchBox) const |
| Does (bb of) shape at index overlap searchBox. | |
| bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
| Does shape at index overlap sphere. | |
| void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
| Calculates nearest (to sample) point in shape. | |
Static Public Member Functions | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh) |
| Calculate and return bounding boxes for all mesh faces. | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelRange &range) |
| Calculate and return bounding boxes for specified range of faces. | |
| static treeBoundBoxList | boxes (const primitiveMesh &mesh, const labelUList &faceIds) |
| Calculate and return bounding boxes for specified mesh faces. | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelRange &range) |
| Return bounding box of specified range of faces. | |
| static treeBoundBox | bounds (const primitiveMesh &mesh, const labelUList &faceIds) |
| Return bounding box of specified mesh faces. | |
Encapsulation of data for searching on faces.
Definition at line 55 of file treeDataFace.H.
| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh ) |
Construct from mesh, using all faces.
Definition at line 176 of file treeDataFace.C.
References mesh(), and update().
Referenced by treeDataFace::findIntersectOp::operator()(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().


| treeDataFace | ( | const bool | cacheBb, |
| const polyPatch & | patch ) |
Construct from mesh, using polyPatch faces.
Definition at line 209 of file treeDataFace.C.
References mesh(), range, and treeDataFace().

| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| const labelRange & | range ) |
Construct from mesh, using specified range of faces.
Definition at line 192 of file treeDataFace.C.
References Foam::identity(), mesh(), range, and update().

| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| const labelUList & | faceLabels ) |
Construct from mesh, copying subset of faces.
Definition at line 219 of file treeDataFace.C.
References faceLabels(), mesh(), and update().

| treeDataFace | ( | const bool | cacheBb, |
| const primitiveMesh & | mesh, | ||
| labelList && | faceLabels ) |
Construct from mesh, moving subset of faces.
Definition at line 236 of file treeDataFace.C.
References faceLabels(), mesh(), and update().

|
inlineexplicit |
Construct from mesh, using all faces.
Definition at line 228 of file treeDataFace.H.
References mesh(), and treeDataFace().

|
inlineexplicit |
Construct from mesh, using polyPatch faces.
Definition at line 236 of file treeDataFace.H.
References treeDataFace().

|
inline |
Construct from mesh, using specified range of faces.
Definition at line 244 of file treeDataFace.H.
References mesh(), range, and treeDataFace().

|
inline |
Construct from mesh, copying subset of faces.
Definition at line 252 of file treeDataFace.H.
References faceLabels(), mesh(), and treeDataFace().

|
inline |
Construct from mesh, moving subset of faces.
Definition at line 260 of file treeDataFace.H.
References faceLabels(), mesh(), and treeDataFace().

| ClassName | ( | "treeDataFace" | ) |
|
static |
Calculate and return bounding boxes for all mesh faces.
Definition at line 90 of file treeDataFace.C.
References Foam::boxesImpl(), and mesh().

|
static |
Calculate and return bounding boxes for specified range of faces.
Definition at line 98 of file treeDataFace.C.
References Foam::boxesImpl(), mesh(), and range.

|
static |
Calculate and return bounding boxes for specified mesh faces.
Definition at line 109 of file treeDataFace.C.
References Foam::boxesImpl(), and mesh().

|
static |
Return bounding box of specified range of faces.
Definition at line 120 of file treeDataFace.C.
References Foam::boundsImpl(), mesh(), and range.
Referenced by bounds().


|
static |
Return bounding box of specified mesh faces.
Definition at line 131 of file treeDataFace.C.
References Foam::boundsImpl(), and mesh().

|
inlinenoexcept |
Object dimension == 2 (face element).
Definition at line 318 of file treeDataFace.H.
References Foam::noexcept.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified face indices.
Definition at line 256 of file treeDataFace.C.
References boundBox::add(), and bounds().

|
inlinenoexcept |
Reference to the supporting mesh.
Definition at line 331 of file treeDataFace.H.
References Foam::noexcept.
Referenced by bounds(), bounds(), boxes(), boxes(), boxes(), ClassName(), findNearest(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().

|
inlinenoexcept |
The subset of face ids to use.
Definition at line 336 of file treeDataFace.H.
References Foam::noexcept.
Referenced by ClassName(), treeDataFace(), treeDataFace(), treeDataFace(), and treeDataFace().

|
inlinenoexcept |
|
inlinenoexcept |
Is the effective face selection empty?
Definition at line 346 of file treeDataFace.H.
References Foam::noexcept.
|
inlinenoexcept |
The size of the face selection.
Definition at line 354 of file treeDataFace.H.
References Foam::noexcept.
|
inline |
Map from shape index to original (non-subset) face label.
Definition at line 362 of file treeDataFace.H.
Referenced by centre(), findNearest(), getVolumeType(), treeDataFace::findIntersectOp::operator()(), operator[](), overlaps(), and overlaps().

|
inline |
Face at specified shape index.
Definition at line 370 of file treeDataFace.H.
References objectIndex().

|
inline |
Representative point (face centre) at shape index.
Definition at line 378 of file treeDataFace.H.
References objectIndex().
Referenced by overlaps().


| Foam::tmp< Foam::pointField > centres | ( | ) | const |
Representative point cloud for contained shapes. One point per shape, corresponding to the face centres.
Definition at line 276 of file treeDataFace.C.
References tmp< T >::New().

| Foam::volumeType 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 287 of file treeDataFace.C.
References Foam::abort(), Vector< Cmpt >::distSqr(), e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, indexedOctree< Type >::getSide(), PointHit< PointType >::hit(), PointIndexHit< PointType >::index(), Foam::mag(), Foam::magSqr(), line< Point, PointRef >::nearestDist(), Foam::normalised(), objectIndex(), PointHit< PointType >::point(), points, Foam::Pout, Foam::sqr(), volumeType::UNKNOWN, and Foam::Zero.

| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does (bb of) shape at index overlap searchBox.
Definition at line 527 of file treeDataFace.C.
References boundBox::containsAny(), f(), forAll, treeBoundBox::intersects(), objectIndex(), treeBoundBox::overlaps(), and points.
Referenced by overlaps().


| bool overlaps | ( | const label | index, |
| const point & | centre, | ||
| const scalar | radiusSqr ) const |
Does shape at index overlap sphere.
Definition at line 586 of file treeDataFace.C.
References centre(), PointHit< PointType >::distance(), f(), polyMesh::faces(), mesh, objectIndex(), overlaps(), points, and Foam::sqr().

| void findNearest | ( | const labelUList & | 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 639 of file treeDataFace.C.
References PointHit< PointType >::distance(), f(), primitiveMesh::faces(), mesh(), objectIndex(), PointHit< PointType >::point(), points, and Foam::sqr().
