searchableSphere.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 searchableSphere_H
00037 #define searchableSphere_H
00038
00039 #include "treeBoundBox.H"
00040 #include "searchableSurface.H"
00041
00042
00043
00044 namespace Foam
00045 {
00046
00047
00048
00049
00050
00051
00052
00053 class searchableSphere
00054 :
00055 public searchableSurface
00056 {
00057 private:
00058
00059
00060
00061
00062 const point centre_;
00063
00064
00065 const scalar radius_;
00066
00067
00068 mutable wordList regions_;
00069
00070
00071
00072
00073
00074 pointIndexHit findNearest
00075 (
00076 const point& sample,
00077 const scalar nearestDistSqr
00078 ) const;
00079
00080
00081 void findLineAll
00082 (
00083 const point& start,
00084 const point& end,
00085 pointIndexHit& near,
00086 pointIndexHit& far
00087 ) const;
00088
00089
00090
00091 searchableSphere(const searchableSphere&);
00092
00093
00094 void operator=(const searchableSphere&);
00095
00096
00097 public:
00098
00099
00100 TypeName("searchableSphere");
00101
00102
00103
00104
00105
00106 searchableSphere(const IOobject& io, const point&, const scalar radius);
00107
00108
00109 searchableSphere
00110 (
00111 const IOobject& io,
00112 const dictionary& dict
00113 );
00114
00115
00116
00117 virtual ~searchableSphere();
00118
00119
00120
00121
00122 virtual const wordList& regions() const;
00123
00124
00125 virtual bool hasVolumeType() const
00126 {
00127 return true;
00128 }
00129
00130
00131 virtual label size() const
00132 {
00133 return 1;
00134 }
00135
00136
00137
00138
00139 virtual void findNearest
00140 (
00141 const pointField& sample,
00142 const scalarField& nearestDistSqr,
00143 List<pointIndexHit>&
00144 ) const;
00145
00146 virtual void findLine
00147 (
00148 const pointField& start,
00149 const pointField& end,
00150 List<pointIndexHit>&
00151 ) const;
00152
00153 virtual void findLineAny
00154 (
00155 const pointField& start,
00156 const pointField& end,
00157 List<pointIndexHit>&
00158 ) const;
00159
00160
00161 virtual void findLineAll
00162 (
00163 const pointField& start,
00164 const pointField& end,
00165 List<List<pointIndexHit> >&
00166 ) const;
00167
00168
00169 virtual void getRegion
00170 (
00171 const List<pointIndexHit>&,
00172 labelList& region
00173 ) const;
00174
00175
00176 virtual void getNormal
00177 (
00178 const List<pointIndexHit>&,
00179 vectorField& normal
00180 ) const;
00181
00182
00183
00184 virtual void getVolumeType
00185 (
00186 const pointField&,
00187 List<volumeType>&
00188 ) const;
00189
00190
00191
00192
00193 bool writeData(Ostream&) const
00194 {
00195 notImplemented("searchableSphere::writeData(Ostream&) const");
00196 return false;
00197 }
00198
00199 };
00200
00201
00202
00203
00204 }
00205
00206
00207
00208 #endif
00209
00210
Copyright © 2000-2009 OpenCFD Ltd