\hypertarget{classUtil_1_1QuadTree}{\section{\-Util\-:\-:\-Quad\-Tree$<$ \-Type $>$ \-Class \-Template \-Reference}
\label{classUtil_1_1QuadTree}\index{\-Util\-::\-Quad\-Tree$<$ Type $>$@{\-Util\-::\-Quad\-Tree$<$ Type $>$}}
}


{\ttfamily \#include $<$\-Quad\-Tree.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classUtil_1_1QuadTree_abb2c79445c3f292aa93a1713beedfc80}{\-Quad\-Tree} (unsigned int width=1, unsigned int height=1)
\item 
\hyperlink{classUtil_1_1QuadTree_ad7653a34ad610ab4596d42158df2c2aa}{$\sim$\-Quad\-Tree} (void)
\item 
unsigned int \hyperlink{classUtil_1_1QuadTree_aac31e3bfa6e99f92a95e027046bf65f1}{get\-Width} (void) const 
\item 
unsigned int \hyperlink{classUtil_1_1QuadTree_a276ccbf9712547c160572002a418e18b}{get\-Height} (void) const 
\item 
std\-::list$<$ \-Type $\ast$ $>$ $\ast$ \hyperlink{classUtil_1_1QuadTree_a85407b835ee283fd98e581ab5fceaca6}{get\-Items} (unsigned int x, unsigned int \hyperlink{BuildOrderManager_8cpp_a0a2f84ed7838f07779ae24c5a9086d33}{y}, unsigned int level=0)
\item 
void \hyperlink{classUtil_1_1QuadTree_a97021f1a46a09f471663d6c7655091e3}{add\-Item} (unsigned int x, unsigned int \hyperlink{BuildOrderManager_8cpp_a0a2f84ed7838f07779ae24c5a9086d33}{y}, \-Type $\ast$item)
\item 
void \hyperlink{classUtil_1_1QuadTree_ab50c68abee723afc9b9e5f9f966f2552}{clear} (unsigned int x, unsigned int \hyperlink{BuildOrderManager_8cpp_a0a2f84ed7838f07779ae24c5a9086d33}{y})
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\subsubsection*{template$<$class Type$>$class Util\-::\-Quad\-Tree$<$ Type $>$}

\-Structure representing 2\-D space containing objects of the specified type. \-This structure is optimised for effective way of finding of objects in certain area. \-The top level of the structure contains single list of all objects included, it divides into 2-\/4 partitions containing lists of units on respective quoters of the space, and so on until sthe width/height size is reached. \-The structure works with list of pointers of the type and doesn't act as owner, so removing items or deleting the whole quad tree will not result in delatation of contained items. 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classUtil_1_1QuadTree_abb2c79445c3f292aa93a1713beedfc80}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!\-Quad\-Tree@{\-Quad\-Tree}}
\index{\-Quad\-Tree@{\-Quad\-Tree}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{\-Quad\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf \-Quad\-Tree} (
\begin{DoxyParamCaption}
\item[{unsigned int}]{width = {\ttfamily 1}, }
\item[{unsigned int}]{height = {\ttfamily 1}}
\end{DoxyParamCaption}
)}}\label{classUtil_1_1QuadTree_abb2c79445c3f292aa93a1713beedfc80}
\-Creates the quad tree with the specified dimensions. 
\begin{DoxyParams}{\-Parameters}
{\em width} & \-Width of the highest detail level partition. \\
\hline
{\em height} & \-Height of the highest detail level partition. \\
\hline
\end{DoxyParams}


\-Here is the call graph for this function\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classUtil_1_1QuadTree_abb2c79445c3f292aa93a1713beedfc80_cgraph}
\end{center}
\end{figure}


\hypertarget{classUtil_1_1QuadTree_ad7653a34ad610ab4596d42158df2c2aa}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!$\sim$\-Quad\-Tree@{$\sim$\-Quad\-Tree}}
\index{$\sim$\-Quad\-Tree@{$\sim$\-Quad\-Tree}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{$\sim$\-Quad\-Tree}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::$\sim${\bf \-Quad\-Tree} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{classUtil_1_1QuadTree_ad7653a34ad610ab4596d42158df2c2aa}
\-Destorys the array, but doesn't delete inserted objects. 

\subsection{\-Member \-Function \-Documentation}
\hypertarget{classUtil_1_1QuadTree_a97021f1a46a09f471663d6c7655091e3}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!add\-Item@{add\-Item}}
\index{add\-Item@{add\-Item}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{add\-Item}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ void {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf add\-Item} (
\begin{DoxyParamCaption}
\item[{unsigned int}]{x, }
\item[{unsigned int}]{y, }
\item[{\-Type $\ast$}]{item}
\end{DoxyParamCaption}
)}}\label{classUtil_1_1QuadTree_a97021f1a46a09f471663d6c7655091e3}
\-Sets item of the array on the specified position. 
\begin{DoxyParams}{\-Parameters}
{\em x} & horizontal index of the array position. \\
\hline
{\em y} & vertical index of the array position. \\
\hline
{\em item} & new value of the field. \\
\hline
\end{DoxyParams}
\hypertarget{classUtil_1_1QuadTree_ab50c68abee723afc9b9e5f9f966f2552}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!clear@{clear}}
\index{clear@{clear}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{clear}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ void {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf clear} (
\begin{DoxyParamCaption}
\item[{unsigned int}]{x, }
\item[{unsigned int}]{y}
\end{DoxyParamCaption}
)}}\label{classUtil_1_1QuadTree_ab50c68abee723afc9b9e5f9f966f2552}
\hypertarget{classUtil_1_1QuadTree_a276ccbf9712547c160572002a418e18b}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!get\-Height@{get\-Height}}
\index{get\-Height@{get\-Height}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{get\-Height}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ unsigned int {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf get\-Height} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
) const}}\label{classUtil_1_1QuadTree_a276ccbf9712547c160572002a418e18b}
\-Gets the height of the array. \begin{DoxyReturn}{\-Returns}
height of the array. 
\end{DoxyReturn}
\hypertarget{classUtil_1_1QuadTree_a85407b835ee283fd98e581ab5fceaca6}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!get\-Items@{get\-Items}}
\index{get\-Items@{get\-Items}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{get\-Items}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ std\-::list$<$\-Type$\ast$$>$$\ast$ {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf get\-Items} (
\begin{DoxyParamCaption}
\item[{unsigned int}]{x, }
\item[{unsigned int}]{y, }
\item[{unsigned int}]{level = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{classUtil_1_1QuadTree_a85407b835ee283fd98e581ab5fceaca6}
\-Gets list of items in the specified region. 
\begin{DoxyParams}{\-Parameters}
{\em x} & horizontal index of the region. \\
\hline
{\em y} & vertical index of the region. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
list of items on the specified region 
\end{DoxyReturn}
\hypertarget{classUtil_1_1QuadTree_aac31e3bfa6e99f92a95e027046bf65f1}{\index{\-Util\-::\-Quad\-Tree@{\-Util\-::\-Quad\-Tree}!get\-Width@{get\-Width}}
\index{get\-Width@{get\-Width}!Util::QuadTree@{\-Util\-::\-Quad\-Tree}}
\subsubsection[{get\-Width}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class Type $>$ unsigned int {\bf \-Util\-::\-Quad\-Tree}$<$ \-Type $>$\-::{\bf get\-Width} (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
) const}}\label{classUtil_1_1QuadTree_aac31e3bfa6e99f92a95e027046bf65f1}
\-Gets the width of the array. \begin{DoxyReturn}{\-Returns}
width of the array. 
\end{DoxyReturn}


\-The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\-Snippy\-Hollo\-W-\/\-Broodwar\-Bot\-Q-\/f01ab56/src/\-Utils/\hyperlink{QuadTree_8h}{\-Quad\-Tree.\-h}\end{DoxyCompactItemize}
