| 58 | \*---------------------------------------------------------------------------*/ |
| 59 | |
| 60 | class treeDataPoint |
| 61 | { |
| 62 | // Private data |
| 63 | |
| 64 | const pointField& points_; |
| 65 | |
| 66 | //- Subset of points to work on (or empty) |
| 67 | const labelList pointLabels_; |
| 68 | |
| 69 | const bool useSubset_; |
| 70 | |
| 71 | public: |
| 72 | |
| 73 | |
| 74 | class findNearestOp |
| 75 | { |
| 76 | const indexedOctree<treeDataPoint>& tree_; |
| 77 | |
| 78 | public: |
| 79 | |
| 80 | findNearestOp(const indexedOctree<treeDataPoint>& tree); |
| 81 | |
| 82 | void operator() |
| 83 | ( |
| 84 | const labelUList& indices, |
| 85 | const point& sample, |
| 86 | |
| 87 | scalar& nearestDistSqr, |
| 88 | label& minIndex, |
| 89 | point& nearestPoint |
| 90 | ) const; |
| 91 | |
| 92 | void operator() |
| 93 | ( |
| 94 | const labelUList& indices, |
| 95 | const linePointRef& ln, |
| 96 | |
| 97 | treeBoundBox& tightest, |
| 98 | label& minIndex, |
| 99 | point& linePoint, |
| 100 | point& nearestPoint |
| 101 | ) const; |
| 102 | }; |
| 103 | |
| 104 | |
| 105 | class findIntersectOp |
| 106 | { |
| 107 | public: |
| 108 | |
| 109 | findIntersectOp(const indexedOctree<treeDataPoint>& tree); |
| 110 | |
| 111 | //- Calculate intersection of triangle with ray. Sets result |
| 112 | // accordingly |
| 113 | bool operator() |
| 114 | ( |
| 115 | const label index, |
| 116 | const point& start, |
| 117 | const point& end, |
no outgoing calls