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 <dynamicTreeDataPoint.H>
Public Member Functions | |
| ClassNameNoDebug ("dynamicTreeDataPoint") | |
| dynamicTreeDataPoint (const DynamicList< point > &points) | |
| Construct from List. Holds reference! | |
| int | nDim () const noexcept |
| Object dimension == 0 (point element). | |
| treeBoundBox | bounds (const labelUList &indices) const |
| Return bounding box for the specified point indices. | |
| const DynamicList< point > & | points () const noexcept |
| The original point field. | |
| bool | useSubset () const noexcept |
| const labelList& pointLabels() const noexcept { labelList::null(); } | |
| bool | empty () const noexcept |
| Is the effective point field empty? | |
| label | size () const noexcept |
| The size of the effective point field. | |
| label | objectIndex (label index) const noexcept |
| Map from shape index to original (non-subset) point label. | |
| const point & | operator[] (label index) const |
| Point at specified shape index. | |
| const point & | centre (label index) const |
| Point at specified shape index. | |
| const DynamicList< point > & | centres () const noexcept |
| Representative point cloud. | |
| volumeType | getVolumeType (const dynamicIndexedOctree< dynamicTreeDataPoint > &, 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 bb. | |
| bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
| Check if any point on shape is inside sphere. | |
| void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
| Calculates nearest (to sample) point in shape. | |
| void | findNearest (const labelUList &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. | |
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 dynamicTreeDataPoint.H.
|
explicit |
Construct from List. Holds reference!
Definition at line 35 of file dynamicTreeDataPoint.C.
References points().

| ClassNameNoDebug | ( | "dynamicTreeDataPoint" | ) |
|
inlinenoexcept |
Object dimension == 0 (point element).
Definition at line 87 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
| Foam::treeBoundBox bounds | ( | const labelUList & | indices | ) | const |
Return bounding box for the specified point indices.
Definition at line 47 of file dynamicTreeDataPoint.C.
|
inlinenoexcept |
The original point field.
Definition at line 100 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
Referenced by ClassNameNoDebug(), and dynamicTreeDataPoint().

|
inlinenoexcept |
const labelList& pointLabels() const noexcept { labelList::null(); }
Use a subset of points
Definition at line 108 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
|
inlinenoexcept |
Is the effective point field empty?
Definition at line 113 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
|
inlinenoexcept |
The size of the effective point field.
Definition at line 118 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
|
inlinenoexcept |
Map from shape index to original (non-subset) point label.
Definition at line 123 of file dynamicTreeDataPoint.H.
|
inline |
Point at specified shape index.
Definition at line 128 of file dynamicTreeDataPoint.H.
|
inline |
Point at specified shape index.
Definition at line 133 of file dynamicTreeDataPoint.H.
Referenced by findNearest(), findNearest(), overlaps(), and overlaps().

|
inlinenoexcept |
Representative point cloud.
Definition at line 138 of file dynamicTreeDataPoint.H.
References Foam::noexcept.
| Foam::volumeType getVolumeType | ( | const dynamicIndexedOctree< dynamicTreeDataPoint > & | 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 53 of file dynamicTreeDataPoint.C.
References volumeType::UNKNOWN.
| bool overlaps | ( | const label | index, |
| const treeBoundBox & | searchBox ) const |
Does (bb of) shape at index overlap bb.
Definition at line 63 of file dynamicTreeDataPoint.C.
References centre(), and treeBoundBox::contains().

| bool overlaps | ( | const label | index, |
| const point & | centre, | ||
| const scalar | radiusSqr ) const |
Check if any point on shape is inside sphere.
Definition at line 73 of file dynamicTreeDataPoint.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 84 of file dynamicTreeDataPoint.C.
References centre().

| void findNearest | ( | const labelUList & | indices, |
| const linePointRef & | ln, | ||
| treeBoundBox & | tightest, | ||
| label & | minIndex, | ||
| point & | linePoint, | ||
| point & | nearestPoint ) const |
Calculates nearest (to line) point in shape.
Returns point and distance (squared)
Definition at line 110 of file dynamicTreeDataPoint.C.
References centre(), treeBoundBox::contains(), PointHit< PointType >::distance(), Vector< Cmpt >::distSqr(), boundBox::grow(), Foam::ln(), PointHit< PointType >::point(), and Foam::sqr().

|
inline |
Calculate intersection of shape with ray.
Sets result accordingly
Definition at line 209 of file dynamicTreeDataPoint.H.
References NotImplemented.