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...
Public Member Functions | |
ClassName ("dynamicTreeDataPoint") | |
dynamicTreeDataPoint (const DynamicList< point > &points) | |
label | size () const |
const DynamicList< point > & | shapePoints () const |
volumeType | getVolumeType (const dynamicIndexedOctree< dynamicTreeDataPoint > &, const point &) const |
bool | overlaps (const label index, const treeBoundBox &sampleBb) const |
bool | overlaps (const label index, const point ¢re, const scalar radiusSqr) const |
void | findNearest (const labelUList &indices, const point &sample, scalar &nearestDistSqr, label &nearestIndex, point &nearestPoint) const |
void | findNearest (const labelUList &indices, const linePointRef &ln, treeBoundBox &tightest, label &minIndex, point &linePoint, point &nearestPoint) const |
bool | intersects (const label index, const point &start, const point &end, point &result) const |
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 57 of file dynamicTreeDataPoint.H.
dynamicTreeDataPoint | ( | const DynamicList< point > & | points | ) |
Definition at line 36 of file dynamicTreeDataPoint.C.
ClassName | ( | "dynamicTreeDataPoint" | ) |
|
inline |
Definition at line 79 of file dynamicTreeDataPoint.H.
const Foam::DynamicList< Foam::point > & shapePoints | ( | ) | const |
Definition at line 47 of file dynamicTreeDataPoint.C.
Foam::volumeType getVolumeType | ( | const dynamicIndexedOctree< dynamicTreeDataPoint > & | oc, |
const point & | sample | ||
) | const |
Definition at line 54 of file dynamicTreeDataPoint.C.
References volumeType::UNKNOWN.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Definition at line 64 of file dynamicTreeDataPoint.C.
References treeBoundBox::contains().
Definition at line 74 of file dynamicTreeDataPoint.C.
References Foam::magSqr(), and p.
void findNearest | ( | const labelUList & | indices, |
const point & | sample, | ||
scalar & | nearestDistSqr, | ||
label & | nearestIndex, | ||
point & | nearestPoint | ||
) | const |
Definition at line 94 of file dynamicTreeDataPoint.C.
References forAll, and Foam::magSqr().
void findNearest | ( | const labelUList & | indices, |
const linePointRef & | ln, | ||
treeBoundBox & | tightest, | ||
label & | minIndex, | ||
point & | linePoint, | ||
point & | nearestPoint | ||
) | const |
Definition at line 122 of file dynamicTreeDataPoint.C.
References treeBoundBox::contains(), PointHit< PointType >::distance(), forAll, Foam::ln(), Foam::magSqr(), boundBox::max(), Foam::max(), boundBox::min(), Foam::min(), PointHit< PointType >::rawPoint(), Foam::sqr(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
inline |
Definition at line 142 of file dynamicTreeDataPoint.H.
References NotImplemented.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.