classutil_1_1Grid.tex 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. \hypertarget{classutil_1_1Grid}{}\section{util\+:\+:Grid Class Reference}
  2. \label{classutil_1_1Grid}\index{util\+::\+Grid@{util\+::\+Grid}}
  3. {\ttfamily \#include $<$Grid.\+h$>$}
  4. \subsection*{Public Member Functions}
  5. \begin{DoxyCompactItemize}
  6. \item
  7. \hyperlink{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}{Grid} (int width\+\_\+count, int height\+\_\+count, double width, double height)
  8. \item
  9. \hyperlink{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}{Grid} (int width\+\_\+count, int height\+\_\+count, int depth\+\_\+count, double width, double height, double depth)
  10. \item
  11. void \hyperlink{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}{Set\+Value} (core\+::\+Object\+Data\+Ptr value, int x, int y, int z=0)
  12. \item
  13. void \hyperlink{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}{Set\+Value} (core\+::\+Object\+Data\+Ptr value, double x, double y, double z=0)
  14. \item
  15. core\+::\+Object\+Data\+Ptr \hyperlink{classutil_1_1Grid_af464d8381c8e9b6c3088854fc0358dfe}{Get\+Value} (int x, int y, int z=0) const
  16. \item
  17. core\+::\+Object\+Data\+Ptr \hyperlink{classutil_1_1Grid_a9171ea7472fdd6010a8065cd9e1c1f06}{Get\+Value} (double x, double y, double z=0.\+0) const
  18. \item
  19. int \hyperlink{classutil_1_1Grid_afcc08d36823ea853f6b50a797684c9bc}{Get\+Width\+Count} () const
  20. \item
  21. int \hyperlink{classutil_1_1Grid_a2c77cf471457b1af17107a92979b24a2}{Get\+Height\+Count} () const
  22. \item
  23. int \hyperlink{classutil_1_1Grid_a330429009107ee0b416dfdbdcbadb5ed}{Get\+Depth\+Count} () const
  24. \item
  25. double \hyperlink{classutil_1_1Grid_aa4d14eb145ab9e3ca6c3a4ae606ced37}{Get\+Width} () const
  26. \item
  27. double \hyperlink{classutil_1_1Grid_a5e9346d2264a2cf241059428cb6c6bc1}{Get\+Height} () const
  28. \item
  29. double \hyperlink{classutil_1_1Grid_a063a8881da7be7919eab6743068232ec}{Get\+Depth} () const
  30. \item
  31. void \hyperlink{classutil_1_1Grid_a7fd996135bf881b2ed4565e8c4a9c2e8}{Position\+To\+Index} (double x, double y, double z, int \&xi, int \&yi, int \&zi) const
  32. \item
  33. void {\bfseries Convolve2D} (int vicinity, double $\ast$mask, double multiplier)\hypertarget{classutil_1_1Grid_a6597c4f785a764c0b291b8135863fe67}{}\label{classutil_1_1Grid_a6597c4f785a764c0b291b8135863fe67}
  34. \item
  35. void {\bfseries Convolve3D} (int vicinity, double $\ast$mask, double multiplier)\hypertarget{classutil_1_1Grid_ac161adb14df09651a6b33f855d887bfa}{}\label{classutil_1_1Grid_ac161adb14df09651a6b33f855d887bfa}
  36. \end{DoxyCompactItemize}
  37. \subsection{Detailed Description}
  38. Class for storing values in a three dimensional grid. Can also be used for two dimensions but has a bit overhead.
  39. \subsection{Constructor \& Destructor Documentation}
  40. \index{util\+::\+Grid@{util\+::\+Grid}!Grid@{Grid}}
  41. \index{Grid@{Grid}!util\+::\+Grid@{util\+::\+Grid}}
  42. \subsubsection[{\texorpdfstring{Grid(int width\+\_\+count, int height\+\_\+count, double width, double height)}{Grid(int width_count, int height_count, double width, double height)}}]{\setlength{\rightskip}{0pt plus 5cm}util\+::\+Grid\+::\+Grid (
  43. \begin{DoxyParamCaption}
  44. \item[{int}]{width\+\_\+count, }
  45. \item[{int}]{height\+\_\+count, }
  46. \item[{double}]{width, }
  47. \item[{double}]{height}
  48. \end{DoxyParamCaption}
  49. )}\hypertarget{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}{}\label{classutil_1_1Grid_a0b2bfd0044eb5633a3f1121e5e70709e}
  50. Creates a new two dimensional grid.
  51. \begin{DoxyParams}{Parameters}
  52. {\em width\+\_\+count} & The number of elements on the x axis \\
  53. \hline
  54. {\em height\+\_\+count} & The number of elements on the y axis \\
  55. \hline
  56. {\em width} & The size of the whole grid on the x axis \\
  57. \hline
  58. {\em height} & The size of the whole grid on the y axis \\
  59. \hline
  60. \end{DoxyParams}
  61. \index{util\+::\+Grid@{util\+::\+Grid}!Grid@{Grid}}
  62. \index{Grid@{Grid}!util\+::\+Grid@{util\+::\+Grid}}
  63. \subsubsection[{\texorpdfstring{Grid(int width\+\_\+count, int height\+\_\+count, int depth\+\_\+count, double width, double height, double depth)}{Grid(int width_count, int height_count, int depth_count, double width, double height, double depth)}}]{\setlength{\rightskip}{0pt plus 5cm}util\+::\+Grid\+::\+Grid (
  64. \begin{DoxyParamCaption}
  65. \item[{int}]{width\+\_\+count, }
  66. \item[{int}]{height\+\_\+count, }
  67. \item[{int}]{depth\+\_\+count, }
  68. \item[{double}]{width, }
  69. \item[{double}]{height, }
  70. \item[{double}]{depth}
  71. \end{DoxyParamCaption}
  72. )}\hypertarget{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}{}\label{classutil_1_1Grid_ad6457dda588e20ccd503e363e96dd57e}
  73. Creates a new three dimensional grid.
  74. \begin{DoxyParams}{Parameters}
  75. {\em width\+\_\+count} & The number of elements on the x axis \\
  76. \hline
  77. {\em height\+\_\+count} & The number of elements on the y axis \\
  78. \hline
  79. {\em depth\+\_\+count} & The number of elements on the z axis \\
  80. \hline
  81. {\em width} & The size of the whole grid on the x axis \\
  82. \hline
  83. {\em height} & The size of the whole grid on the y axis \\
  84. \hline
  85. {\em depth} & The size of the whole grid on the z axis \\
  86. \hline
  87. \end{DoxyParams}
  88. \subsection{Member Function Documentation}
  89. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Depth@{Get\+Depth}}
  90. \index{Get\+Depth@{Get\+Depth}!util\+::\+Grid@{util\+::\+Grid}}
  91. \subsubsection[{\texorpdfstring{Get\+Depth() const }{GetDepth() const }}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Depth (
  92. \begin{DoxyParamCaption}
  93. {}
  94. \end{DoxyParamCaption}
  95. ) const}\hypertarget{classutil_1_1Grid_a063a8881da7be7919eab6743068232ec}{}\label{classutil_1_1Grid_a063a8881da7be7919eab6743068232ec}
  96. Gets the size of the whole grid on the z axis. \begin{DoxyReturn}{Returns}
  97. the size of the whole grid on the z axis
  98. \end{DoxyReturn}
  99. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Depth\+Count@{Get\+Depth\+Count}}
  100. \index{Get\+Depth\+Count@{Get\+Depth\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  101. \subsubsection[{\texorpdfstring{Get\+Depth\+Count() const }{GetDepthCount() const }}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Depth\+Count (
  102. \begin{DoxyParamCaption}
  103. {}
  104. \end{DoxyParamCaption}
  105. ) const}\hypertarget{classutil_1_1Grid_a330429009107ee0b416dfdbdcbadb5ed}{}\label{classutil_1_1Grid_a330429009107ee0b416dfdbdcbadb5ed}
  106. Gets the number of elements on the z axis. \begin{DoxyReturn}{Returns}
  107. The number of elements on the z axis
  108. \end{DoxyReturn}
  109. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Height@{Get\+Height}}
  110. \index{Get\+Height@{Get\+Height}!util\+::\+Grid@{util\+::\+Grid}}
  111. \subsubsection[{\texorpdfstring{Get\+Height() const }{GetHeight() const }}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Height (
  112. \begin{DoxyParamCaption}
  113. {}
  114. \end{DoxyParamCaption}
  115. ) const}\hypertarget{classutil_1_1Grid_a5e9346d2264a2cf241059428cb6c6bc1}{}\label{classutil_1_1Grid_a5e9346d2264a2cf241059428cb6c6bc1}
  116. Gets the size of the whole grid on the y axis. \begin{DoxyReturn}{Returns}
  117. the size of the whole grid on the y axis
  118. \end{DoxyReturn}
  119. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Height\+Count@{Get\+Height\+Count}}
  120. \index{Get\+Height\+Count@{Get\+Height\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  121. \subsubsection[{\texorpdfstring{Get\+Height\+Count() const }{GetHeightCount() const }}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Height\+Count (
  122. \begin{DoxyParamCaption}
  123. {}
  124. \end{DoxyParamCaption}
  125. ) const}\hypertarget{classutil_1_1Grid_a2c77cf471457b1af17107a92979b24a2}{}\label{classutil_1_1Grid_a2c77cf471457b1af17107a92979b24a2}
  126. Gets the number of elements on the y axis. \begin{DoxyReturn}{Returns}
  127. The number of elements on the y axis
  128. \end{DoxyReturn}
  129. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Value@{Get\+Value}}
  130. \index{Get\+Value@{Get\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  131. \subsubsection[{\texorpdfstring{Get\+Value(int x, int y, int z=0) const }{GetValue(int x, int y, int z=0) const }}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Object\+Data\+Ptr util\+::\+Grid\+::\+Get\+Value (
  132. \begin{DoxyParamCaption}
  133. \item[{int}]{x, }
  134. \item[{int}]{y, }
  135. \item[{int}]{z = {\ttfamily 0}}
  136. \end{DoxyParamCaption}
  137. ) const}\hypertarget{classutil_1_1Grid_af464d8381c8e9b6c3088854fc0358dfe}{}\label{classutil_1_1Grid_af464d8381c8e9b6c3088854fc0358dfe}
  138. Gets the value in the grid cell with the given index.
  139. \begin{DoxyParams}{Parameters}
  140. {\em x} & The x axis index \\
  141. \hline
  142. {\em y} & The y axis index \\
  143. \hline
  144. {\em z} & The z axis index \\
  145. \hline
  146. \end{DoxyParams}
  147. \begin{DoxyReturn}{Returns}
  148. The value in the grid cell
  149. \end{DoxyReturn}
  150. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Value@{Get\+Value}}
  151. \index{Get\+Value@{Get\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  152. \subsubsection[{\texorpdfstring{Get\+Value(double x, double y, double z=0.\+0) const }{GetValue(double x, double y, double z=0.0) const }}]{\setlength{\rightskip}{0pt plus 5cm}core\+::\+Object\+Data\+Ptr util\+::\+Grid\+::\+Get\+Value (
  153. \begin{DoxyParamCaption}
  154. \item[{double}]{x, }
  155. \item[{double}]{y, }
  156. \item[{double}]{z = {\ttfamily 0.0}}
  157. \end{DoxyParamCaption}
  158. ) const}\hypertarget{classutil_1_1Grid_a9171ea7472fdd6010a8065cd9e1c1f06}{}\label{classutil_1_1Grid_a9171ea7472fdd6010a8065cd9e1c1f06}
  159. Gets the value in the grid cell at the given position.
  160. \begin{DoxyParams}{Parameters}
  161. {\em x} & The x axis value \\
  162. \hline
  163. {\em y} & The y axis value \\
  164. \hline
  165. {\em z} & The z axis value \\
  166. \hline
  167. \end{DoxyParams}
  168. \begin{DoxyReturn}{Returns}
  169. The value in the grid cell
  170. \end{DoxyReturn}
  171. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Width@{Get\+Width}}
  172. \index{Get\+Width@{Get\+Width}!util\+::\+Grid@{util\+::\+Grid}}
  173. \subsubsection[{\texorpdfstring{Get\+Width() const }{GetWidth() const }}]{\setlength{\rightskip}{0pt plus 5cm}double util\+::\+Grid\+::\+Get\+Width (
  174. \begin{DoxyParamCaption}
  175. {}
  176. \end{DoxyParamCaption}
  177. ) const}\hypertarget{classutil_1_1Grid_aa4d14eb145ab9e3ca6c3a4ae606ced37}{}\label{classutil_1_1Grid_aa4d14eb145ab9e3ca6c3a4ae606ced37}
  178. Gets the size of the whole grid on the x axis. \begin{DoxyReturn}{Returns}
  179. the size of the whole grid on the x axis
  180. \end{DoxyReturn}
  181. \index{util\+::\+Grid@{util\+::\+Grid}!Get\+Width\+Count@{Get\+Width\+Count}}
  182. \index{Get\+Width\+Count@{Get\+Width\+Count}!util\+::\+Grid@{util\+::\+Grid}}
  183. \subsubsection[{\texorpdfstring{Get\+Width\+Count() const }{GetWidthCount() const }}]{\setlength{\rightskip}{0pt plus 5cm}int util\+::\+Grid\+::\+Get\+Width\+Count (
  184. \begin{DoxyParamCaption}
  185. {}
  186. \end{DoxyParamCaption}
  187. ) const}\hypertarget{classutil_1_1Grid_afcc08d36823ea853f6b50a797684c9bc}{}\label{classutil_1_1Grid_afcc08d36823ea853f6b50a797684c9bc}
  188. Gets the number of elements on the x axis. \begin{DoxyReturn}{Returns}
  189. The number of elements on the x axis
  190. \end{DoxyReturn}
  191. \index{util\+::\+Grid@{util\+::\+Grid}!Position\+To\+Index@{Position\+To\+Index}}
  192. \index{Position\+To\+Index@{Position\+To\+Index}!util\+::\+Grid@{util\+::\+Grid}}
  193. \subsubsection[{\texorpdfstring{Position\+To\+Index(double x, double y, double z, int \&xi, int \&yi, int \&zi) const }{PositionToIndex(double x, double y, double z, int &xi, int &yi, int &zi) const }}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Position\+To\+Index (
  194. \begin{DoxyParamCaption}
  195. \item[{double}]{x, }
  196. \item[{double}]{y, }
  197. \item[{double}]{z, }
  198. \item[{int \&}]{xi, }
  199. \item[{int \&}]{yi, }
  200. \item[{int \&}]{zi}
  201. \end{DoxyParamCaption}
  202. ) const}\hypertarget{classutil_1_1Grid_a7fd996135bf881b2ed4565e8c4a9c2e8}{}\label{classutil_1_1Grid_a7fd996135bf881b2ed4565e8c4a9c2e8}
  203. Converts a 3D position to an 3D index.
  204. \begin{DoxyParams}{Parameters}
  205. {\em x} & The x axis value \\
  206. \hline
  207. {\em y} & The y axis value \\
  208. \hline
  209. {\em z} & The z axis value \\
  210. \hline
  211. {\em xi} & The x axis index \\
  212. \hline
  213. {\em yi} & The y axis index \\
  214. \hline
  215. {\em zi} & The z axis index \\
  216. \hline
  217. \end{DoxyParams}
  218. \index{util\+::\+Grid@{util\+::\+Grid}!Set\+Value@{Set\+Value}}
  219. \index{Set\+Value@{Set\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  220. \subsubsection[{\texorpdfstring{Set\+Value(core\+::\+Object\+Data\+Ptr value, int x, int y, int z=0)}{SetValue(core::ObjectDataPtr value, int x, int y, int z=0)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Set\+Value (
  221. \begin{DoxyParamCaption}
  222. \item[{core\+::\+Object\+Data\+Ptr}]{value, }
  223. \item[{int}]{x, }
  224. \item[{int}]{y, }
  225. \item[{int}]{z = {\ttfamily 0}}
  226. \end{DoxyParamCaption}
  227. )}\hypertarget{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}{}\label{classutil_1_1Grid_a0e93bd63922e7cbe405176a1ae21877e}
  228. Sets a value in the grid cell with the given index.
  229. \begin{DoxyParams}{Parameters}
  230. {\em value} & The value to set \\
  231. \hline
  232. {\em x} & The x axis index \\
  233. \hline
  234. {\em y} & The y axis index \\
  235. \hline
  236. {\em z} & The z axis index \\
  237. \hline
  238. \end{DoxyParams}
  239. \index{util\+::\+Grid@{util\+::\+Grid}!Set\+Value@{Set\+Value}}
  240. \index{Set\+Value@{Set\+Value}!util\+::\+Grid@{util\+::\+Grid}}
  241. \subsubsection[{\texorpdfstring{Set\+Value(core\+::\+Object\+Data\+Ptr value, double x, double y, double z=0)}{SetValue(core::ObjectDataPtr value, double x, double y, double z=0)}}]{\setlength{\rightskip}{0pt plus 5cm}void util\+::\+Grid\+::\+Set\+Value (
  242. \begin{DoxyParamCaption}
  243. \item[{core\+::\+Object\+Data\+Ptr}]{value, }
  244. \item[{double}]{x, }
  245. \item[{double}]{y, }
  246. \item[{double}]{z = {\ttfamily 0}}
  247. \end{DoxyParamCaption}
  248. )}\hypertarget{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}{}\label{classutil_1_1Grid_ad7dbf79146d9f5ae1662910b82fd25ea}
  249. Sets a value in the grid cell at the given position.
  250. \begin{DoxyParams}{Parameters}
  251. {\em value} & The value to set \\
  252. \hline
  253. {\em x} & The x axis value \\
  254. \hline
  255. {\em y} & The y axis value \\
  256. \hline
  257. {\em z} & The z axis value \\
  258. \hline
  259. \end{DoxyParams}
  260. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  261. \item
  262. util/Grid.\+h\item
  263. util/Grid.\+cpp\end{DoxyCompactItemize}