Encapsulation of data needed to search on PrimitivePatches. More...
#include <treeDataPrimitivePatch.H>


Classes | |
| class | findNearestOp |
| class | findIntersectOp |
| class | findAllIntersectOp |
| class | findSelfIntersectOp |
Public Member Functions | |
| treeDataPrimitivePatch (const bool cacheBb, const PatchType &patch, const scalar planarTol) | |
| Construct from patch. | |
| treeDataPrimitivePatch (const PatchType &patch, const scalar planarTol) | |
| Construct from patch. | |
| int | nDim () const noexcept |
| Object dimension == 2 (face element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified face indices. | |
| const PatchType & | patch () const noexcept |
| The underlying patch. | |
| bool | useSubset () const noexcept |
| const labelList& faceLabels() const noexcept { labelList::null(); } | |
| bool | empty () const |
| Is the patch empty (no faces)? | |
| label | size () const |
| The patch size. | |
| label | objectIndex (const label index) const noexcept |
| Map from shape index to original (non-subset) face label. | |
| 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< treeDataPrimitivePatch< PatchType > > &, 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 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. | |
| Foam::volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< triSurface > > &oc, const point &sample) const |
| volumeType | getVolumeType (const indexedOctree< treeDataPrimitivePatch< triSurface > > &oc, const point &sample) const |
| Template specialisation of getVolumeType for treeDataTriSurface. | |
Static Public Member Functions | |
| static treeBoundBoxList | boxes (const PatchType &patch) |
| Calculate and return bounding boxes for each patch face. | |
| static bool | findIntersection (const indexedOctree< treeDataPrimitivePatch< PatchType > > &tree, const label index, const point &start, const point &end, point &intersectionPoint) |
| Helper: find intersection of line with shapes. | |
Encapsulation of data needed to search on PrimitivePatches.
Definition at line 59 of file treeDataPrimitivePatch.H.
| treeDataPrimitivePatch | ( | const bool | cacheBb, |
| const PatchType & | patch, | ||
| const scalar | planarTol ) |
Construct from patch.
Definition at line 78 of file treeDataPrimitivePatch.C.
References patch(), and update().
Referenced by treeDataPrimitivePatch< PatchType >::findAllIntersectOp::findAllIntersectOp(), findIntersection(), treeDataPrimitivePatch< PatchType >::findIntersectOp::findIntersectOp(), treeDataPrimitivePatch< PatchType >::findNearestOp::findNearestOp(), treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::findSelfIntersectOp(), getVolumeType(), and treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()().


|
inline |
Construct from patch.
Definition at line 238 of file treeDataPrimitivePatch.H.
|
static |
Calculate and return bounding boxes for each patch face.
Definition at line 32 of file treeDataPrimitivePatch.C.
References UList< T >::begin(), f(), points, and pp().

|
inlinenoexcept |
Object dimension == 2 (face element).
Definition at line 257 of file treeDataPrimitivePatch.H.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified face indices.
Definition at line 142 of file treeDataPrimitivePatch.C.
|
inlinenoexcept |
The underlying patch.
Definition at line 270 of file treeDataPrimitivePatch.H.
Referenced by findIntersection(), findNearestMaskedOp< PatchType >::operator()(), treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()(), and treeDataPrimitivePatch().

|
inlinenoexcept |
const labelList& faceLabels() const noexcept { labelList::null(); }
Use a subset of the patch
Definition at line 278 of file treeDataPrimitivePatch.H.
|
inline |
Is the patch empty (no faces)?
Definition at line 283 of file treeDataPrimitivePatch.H.
|
inline |
The patch size.
Definition at line 288 of file treeDataPrimitivePatch.H.
|
inlinenoexcept |
Map from shape index to original (non-subset) face label.
Definition at line 293 of file treeDataPrimitivePatch.H.
|
inline |
Representative point (face centre) at shape index.
const typename PatchType::face_type& operator[](label index) const { return patch_[index]; }
Definition at line 302 of file treeDataPrimitivePatch.H.
Referenced by overlaps().

|
inline |
Representative point cloud for contained shapes. One point per shape, corresponding to the face centres.
Definition at line 311 of file treeDataPrimitivePatch.H.
| Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< PatchType > > & | 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 159 of file treeDataPrimitivePatch.C.
References treeDataPrimitivePatch().

| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does shape at index overlap searchBox.
Definition at line 388 of file treeDataPrimitivePatch.C.
References boundBox::containsAny(), f(), forAll, treeBoundBox::intersects(), 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 447 of file treeDataPrimitivePatch.C.
References centre(), PointHit< PointType >::distance(), f(), overlaps(), points, and Foam::sqr().

|
static |
Helper: find intersection of line with shapes.
Definition at line 615 of file treeDataPrimitivePatch.C.
References PointHit< PointType >::distance(), f(), intersection::HALF_RAY, PointHit< PointType >::hit(), triangle< Point, PointRef >::intersection(), patch(), PointHit< PointType >::point(), points, treeBoundBox::posBits(), tree(), and treeDataPrimitivePatch().
Referenced by treeDataPrimitivePatch< PatchType >::findAllIntersectOp::operator()(), treeDataPrimitivePatch< PatchType >::findIntersectOp::operator()(), and treeDataPrimitivePatch< PatchType >::findSelfIntersectOp::operator()().


| 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 484 of file treeDataPrimitivePatch.C.
References PointHit< PointType >::distance(), f(), PointHit< PointType >::point(), points, and Foam::sqr().

| Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface > > & | oc, |
| const point & | sample ) const |
Definition at line 28 of file treeDataTriSurface.C.
| volumeType getVolumeType | ( | const indexedOctree< treeDataPrimitivePatch< triSurface > > & | oc, |
| const point & | sample ) const |
Template specialisation of getVolumeType for treeDataTriSurface.