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...
Classes | |
class | findIntersectOp |
class | findNearestOp |
Public Member Functions | |
ClassName ("treeDataPoint") | |
treeDataPoint (const pointField &points) | |
Construct from pointField. More... | |
treeDataPoint (const pointField &points, const labelUList &pointLabels, const bool useSubsetPoints=true) | |
Construct from subset of pointField, copies point ids. More... | |
treeDataPoint (const pointField &points, labelList &&pointLabels, const bool useSubsetPoints=true) | |
Construct from subset of pointField, moves point ids. More... | |
bool | empty () const |
An empty effective point field? More... | |
label | size () const |
The effective point field size. More... | |
const pointField & | points () const |
The original point field. More... | |
const labelList & | pointLabels () const |
The original point ids. More... | |
bool | useSubset () const |
Use a subset of points. More... | |
label | pointLabel (const label index) const |
The original (non-subset) point label. More... | |
const point & | shapePoint (const label index) const |
Point at specified index. More... | |
pointField | shapePoints () const |
volumeType | getVolumeType (const indexedOctree< treeDataPoint > &os, const point &sample) const |
Get type (inside,outside,mixed,unknown) of point w.r.t. surface. More... | |
bool | overlaps (const label index, const treeBoundBox &sampleBb) const |
Does (bb of) shape at index overlap bb. More... | |
bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
Does shape at index overlap the sphere. More... | |
const point & | operator[] (const label index) const |
The point at the specified index. More... | |
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 62 of file treeDataPoint.H.
|
explicit |
Construct from pointField.
Definition at line 44 of file treeDataPoint.C.
treeDataPoint | ( | const pointField & | points, |
const labelUList & | pointLabels, | ||
const bool | useSubsetPoints = true |
||
) |
Construct from subset of pointField, copies point ids.
Definition at line 51 of file treeDataPoint.C.
treeDataPoint | ( | const pointField & | points, |
labelList && | pointLabels, | ||
const bool | useSubsetPoints = true |
||
) |
Construct from subset of pointField, moves point ids.
Definition at line 64 of file treeDataPoint.C.
ClassName | ( | "treeDataPoint" | ) |
|
inline |
An empty effective point field?
Definition at line 159 of file treeDataPoint.H.
References UList< T >::empty().
|
inline |
The effective point field size.
Definition at line 170 of file treeDataPoint.H.
References UList< T >::size().
|
inline |
The original point field.
Definition at line 181 of file treeDataPoint.H.
|
inline |
The original point ids.
Definition at line 187 of file treeDataPoint.H.
|
inline |
Use a subset of points.
Definition at line 193 of file treeDataPoint.H.
|
inline |
The original (non-subset) point label.
Definition at line 199 of file treeDataPoint.H.
|
inline |
Point at specified index.
Definition at line 210 of file treeDataPoint.H.
Referenced by treeDataPoint::findNearestOp::operator()(), treeDataPoint::operator[](), and treeDataPoint::overlaps().
Foam::pointField shapePoints | ( | ) | const |
Representative point cloud for all shapes inside (one point per shape)
Definition at line 95 of file treeDataPoint.C.
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 106 of file treeDataPoint.C.
References volumeType::UNKNOWN.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 116 of file treeDataPoint.C.
References treeBoundBox::contains(), and treeDataPoint::shapePoint().
Does shape at index overlap the sphere.
Definition at line 126 of file treeDataPoint.C.
References Foam::magSqr(), and treeDataPoint::shapePoint().
|
inline |
The point at the specified index.
Definition at line 254 of file treeDataPoint.H.
References treeDataPoint::shapePoint().