Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense. More...
#include <treeDataPoint.H>
Classes | |
| class | findNearestOp |
| Forward to treeDataPoint findNearest operations. More... | |
| class | findIntersectOp |
| Forward to treeDataPoint findIntersect operations (not possible). More... | |
Public Member Functions | |
| ClassNameNoDebug ("treeDataPoint") | |
| treeDataPoint (const pointField &points) | |
| Construct from pointField. | |
| treeDataPoint (const pointField &points, const labelUList &pointLabels, const bool useSubsetPoints=true) | |
| Construct from subset of pointField, copies point ids. | |
| treeDataPoint (const pointField &points, labelList &&pointLabels, const bool useSubsetPoints=true) | |
| Construct from subset of pointField, moves point ids. | |
| int | nDim () const noexcept |
| Object dimension == 0 (point element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified point indices. | |
| const pointField & | points () const noexcept |
| The original point field. | |
| const labelList & | pointLabels () const noexcept |
| The subset of point ids to use. | |
| bool | useSubset () const noexcept |
| Use a subset of points. | |
| bool | empty () const noexcept |
| Is the effective point field empty? | |
| label | size () const noexcept |
| The size of the effective point field. | |
| label | objectIndex (const label index) const |
| Map to the original (non-subset) point label. | |
| const point & | operator[] (const label index) const |
| Point at specified shape index. | |
| const point & | centre (const label index) const |
| Point at specified shape index. | |
| tmp< pointField > | centres () const |
| Point cloud. | |
| volumeType | getVolumeType (const indexedOctree< treeDataPoint > &os, const point &sample) 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 searchBox. | |
| bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
| Does shape at index overlap the sphere. | |
| void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
| Calculates nearest (to sample) point in shape. | |
| label | pointLabel (label index) const |
| Map to the original (non-subset) point label. | |
Holds (reference to) pointField. Encapsulation of data needed for octree searches. Used for searching for nearest point. No bounding boxes around points. Only overlaps and calcNearest are implemented, rest makes little sense.
Optionally works on subset of points.
Definition at line 58 of file treeDataPoint.H.
|
explicit |
Construct from pointField.
Definition at line 35 of file treeDataPoint.C.
References points().
Referenced by treeDataPoint::findNearestOp::operator()().


| treeDataPoint | ( | const pointField & | points, |
| const labelUList & | pointLabels, | ||
| const bool | useSubsetPoints = true ) |
Construct from subset of pointField, copies point ids.
Definition at line 42 of file treeDataPoint.C.
References pointLabels(), and points().

| treeDataPoint | ( | const pointField & | points, |
| labelList && | pointLabels, | ||
| const bool | useSubsetPoints = true ) |
Construct from subset of pointField, moves point ids.
Definition at line 55 of file treeDataPoint.C.
References pointLabels(), and points().

| ClassNameNoDebug | ( | "treeDataPoint" | ) |
|
inlinenoexcept |
Object dimension == 0 (point element).
Definition at line 181 of file treeDataPoint.H.
References Foam::noexcept.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified point indices.
Definition at line 70 of file treeDataPoint.C.
References boundBox::add().

|
inlinenoexcept |
The original point field.
Definition at line 194 of file treeDataPoint.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), treeDataPoint(), treeDataPoint(), and treeDataPoint().

|
inlinenoexcept |
The subset of point ids to use.
Definition at line 199 of file treeDataPoint.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), treeDataPoint(), and treeDataPoint().

|
inlinenoexcept |
|
inlinenoexcept |
Is the effective point field empty?
Definition at line 209 of file treeDataPoint.H.
References Foam::noexcept.
|
inlinenoexcept |
The size of the effective point field.
Definition at line 217 of file treeDataPoint.H.
References Foam::noexcept.
|
inline |
Map to the original (non-subset) point label.
Definition at line 225 of file treeDataPoint.H.
Referenced by centre(), operator[](), and pointLabel().

|
inline |
Point at specified shape index.
Definition at line 233 of file treeDataPoint.H.
References objectIndex().

|
inline |
Point at specified shape index.
Definition at line 241 of file treeDataPoint.H.
References objectIndex().
Referenced by findNearest(), treeDataPoint::findNearestOp::operator()(), overlaps(), and overlaps().


| Foam::tmp< Foam::pointField > centres | ( | ) | const |
Point cloud.
Definition at line 86 of file treeDataPoint.C.
References tmp< T >::New().

| Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPoint > & | os, |
| 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 97 of file treeDataPoint.C.
References volumeType::UNKNOWN.
| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does (bb of) shape at index searchBox.
Definition at line 107 of file treeDataPoint.C.
References centre(), and treeBoundBox::contains().

| bool overlaps | ( | const label | index, |
| const point & | centre, | ||
| const scalar | radiusSqr ) const |
Does shape at index overlap the sphere.
Definition at line 117 of file treeDataPoint.C.
References centre().

| 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 146 of file treeDataPoint.C.
References centre().

|
inline |
Map to the original (non-subset) point label.
/FOAM_DEPRECATED_FOR(2022-10, "objectIndex()")
Definition at line 307 of file treeDataPoint.H.
References objectIndex().
