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...
Data Structures | |
class | findIntersectOp |
class | findNearestOp |
Public Member Functions | |
ClassName ("treeDataPoint") | |
treeDataPoint (const pointField &) | |
Construct from pointField. Holds reference! More... | |
treeDataPoint (const pointField &, const labelList &) | |
Construct from subset of pointField. Holds reference! More... | |
label | size () const |
const labelList & | pointLabels () const |
const pointField & | points () const |
bool | useSubset () const |
pointField | shapePoints () const |
Get representative point cloud for all shapes inside. More... | |
volumeType | getVolumeType (const indexedOctree< treeDataPoint > &, const point &) 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... | |
Private Attributes | |
const pointField & | points_ |
const labelList | pointLabels_ |
Subset of points to work on (or empty) More... | |
const bool | useSubset_ |
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 59 of file treeDataPoint.H.
treeDataPoint | ( | const pointField & | points | ) |
Construct from pointField. Holds reference!
Definition at line 41 of file treeDataPoint.C.
treeDataPoint | ( | const pointField & | points, |
const labelList & | pointLabels | ||
) |
Construct from subset of pointField. Holds reference!
Definition at line 49 of file treeDataPoint.C.
ClassName | ( | "treeDataPoint" | ) |
|
inline |
Definition at line 139 of file treeDataPoint.H.
References treeDataPoint::pointLabels_, treeDataPoint::points_, List::size(), and treeDataPoint::useSubset_.
|
inline |
Definition at line 149 of file treeDataPoint.H.
References treeDataPoint::pointLabels_.
Referenced by treeDataPoint::findNearestOp::operator()().
|
inline |
Definition at line 154 of file treeDataPoint.H.
References treeDataPoint::points_.
Referenced by treeDataPoint::findNearestOp::operator()().
|
inline |
Definition at line 159 of file treeDataPoint.H.
References treeDataPoint::useSubset_.
Referenced by treeDataPoint::findNearestOp::operator()().
Foam::pointField shapePoints | ( | ) | const |
Get representative point cloud for all shapes inside.
(one point per shape)
Definition at line 78 of file treeDataPoint.C.
Foam::volumeType getVolumeType | ( | const indexedOctree< treeDataPoint > & | 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 94 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 105 of file treeDataPoint.C.
References treeBoundBox::contains().
Does shape at index overlap the sphere.
Definition at line 117 of file treeDataPoint.C.
References Foam::magSqr().
|
private |
Definition at line 63 of file treeDataPoint.H.
Referenced by treeDataPoint::points(), and treeDataPoint::size().
|
private |
Subset of points to work on (or empty)
Definition at line 66 of file treeDataPoint.H.
Referenced by treeDataPoint::pointLabels(), and treeDataPoint::size().
|
private |
Definition at line 68 of file treeDataPoint.H.
Referenced by treeDataPoint::size(), and treeDataPoint::useSubset().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.