octreeDataEdges.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef octreeDataEdges_H
00037 #define octreeDataEdges_H
00038
00039 #include "line.H"
00040 #include "linePointRef.H"
00041 #include "treeBoundBoxList.H"
00042 #include "labelList.H"
00043 #include "className.H"
00044
00045
00046
00047 namespace Foam
00048 {
00049
00050
00051 template<class Type> class octree;
00052
00053
00054
00055
00056
00057 class octreeDataEdges
00058 {
00059
00060
00061
00062 static scalar tol;
00063
00064
00065
00066
00067
00068 const edgeList& edges_;
00069
00070
00071 const pointField& points_;
00072
00073
00074 labelList edgeLabels_;
00075
00076
00077 treeBoundBoxList allBb_;
00078
00079
00080 public:
00081
00082
00083 ClassName("octreeDataEdges");
00084
00085
00086
00087
00088 octreeDataEdges
00089 (
00090 const edgeList& edges,
00091 const pointField& points,
00092 const labelList& edgeLabels
00093 );
00094
00095
00096 octreeDataEdges(const octreeDataEdges&);
00097
00098
00099
00100
00101 ~octreeDataEdges();
00102
00103
00104
00105
00106
00107
00108 const edgeList& edges() const
00109 {
00110 return edges_;
00111 }
00112
00113 const pointField& points() const
00114 {
00115 return points_;
00116 }
00117
00118 const labelList& edgeLabels() const
00119 {
00120 return edgeLabels_;
00121 }
00122
00123 const treeBoundBoxList& allBb() const
00124 {
00125 return allBb_;
00126 }
00127
00128 label size() const
00129 {
00130 return allBb_.size();
00131 }
00132
00133
00134
00135
00136
00137 label getSampleType
00138 (
00139 const octree<octreeDataEdges>&,
00140 const point&
00141 ) const;
00142
00143
00144 bool overlaps
00145 (
00146 const label index,
00147 const treeBoundBox& sampleBb
00148 ) const;
00149
00150
00151 bool contains
00152 (
00153 const label index,
00154 const point& sample
00155 ) const;
00156
00157
00158
00159 bool intersects
00160 (
00161 const label index,
00162 const point& start,
00163 const point& end,
00164 point& intersectionPoint
00165 ) const;
00166
00167
00168
00169
00170 bool findTightest
00171 (
00172 const label index,
00173 const point& sample,
00174 treeBoundBox& tightest
00175 ) const;
00176
00177
00178
00179
00180 scalar calcSign
00181 (
00182 const label index,
00183 const point& sample,
00184 vector& n
00185 ) const;
00186
00187
00188
00189 scalar calcNearest
00190 (
00191 const label index,
00192 const point& sample,
00193 point& nearest
00194 ) const;
00195
00196
00197
00198 scalar calcNearest
00199 (
00200 const label index,
00201 const linePointRef& ln,
00202 point& linePt,
00203 point& shapePt
00204 ) const;
00205
00206
00207
00208
00209
00210 void write(Ostream& os, const label index) const;
00211 };
00212
00213
00214
00215
00216 }
00217
00218
00219
00220
00221 #endif
00222
00223
Copyright © 2000-2009 OpenCFD Ltd