\doxysubsubsection{Quadtrees}
\hypertarget{group__Eina__Quadtree__Group}{}\label{group__Eina__Quadtree__Group}\index{Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \+\_\+\+Eina\+\_\+\+Quad\+Tree \mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}}
\begin{DoxyCompactList}\small\item\em A quadtree is a data structure where each node contains four child nodes. \end{DoxyCompactList}\item 
\Hypertarget{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}\label{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0} 
typedef struct \+\_\+\+Eina\+\_\+\+Quad\+Tree\+\_\+\+Item {\bfseries Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}
\begin{DoxyCompactList}\small\item\em A quadtree item is a holder for (void \texorpdfstring{$\ast$}{*}) data items inside a quadtree, that includes some state tracking for lifecycle management and optimization purposes. \end{DoxyCompactList}\item 
typedef Eina\+\_\+\+Quad\+\_\+\+Direction(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}{Eina\+\_\+\+Quad\+\_\+\+Callback}}) (const void \texorpdfstring{$\ast$}{*}object, size\+\_\+t middle)
\begin{DoxyCompactList}\small\item\em Signature for a callback routine used to determine the location of an object within a quadtree. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{group__Eina__Quadtree__Group_gaa00a32604b2f5fdb39347a320395b795}\label{group__Eina__Quadtree__Group_gaa00a32604b2f5fdb39347a320395b795} 
enum {\bfseries Eina\+\_\+\+Quad\+\_\+\+Direction} \{ \newline
{\bfseries EINA\+\_\+\+QUAD\+\_\+\+LEFT}
, \newline
{\bfseries EINA\+\_\+\+QUAD\+\_\+\+RIGHT}
, \newline
{\bfseries EINA\+\_\+\+QUAD\+\_\+\+BOTH}
 \}
\end{DoxyCompactItemize}
\doxysubsubsubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga05a2e24db89db3e9c56c5c660810b4e0}{eina\+\_\+quadtree\+\_\+new}} (size\+\_\+t w, size\+\_\+t h, \mbox{\hyperlink{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}{Eina\+\_\+\+Quad\+\_\+\+Callback}} vertical, \mbox{\hyperlink{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}{Eina\+\_\+\+Quad\+\_\+\+Callback}} horizontal)
\begin{DoxyCompactList}\small\item\em Constructs a quadtree object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Quadtree__Group_ga02d40a1a5679741c8f487b7494cbceca}{eina\+\_\+quadtree\+\_\+free}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}q)
\begin{DoxyCompactList}\small\item\em Destructs quadtree and its data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Quadtree__Group_gaa1951a153f10e5e008d582f2eab6ba8b}{eina\+\_\+quadtree\+\_\+resize}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}q, size\+\_\+t w, size\+\_\+t h)
\begin{DoxyCompactList}\small\item\em Changes the width and height of the quadtree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Quadtree__Group_gacc0b887439b5a934f199a03ae41766b3}{eina\+\_\+quadtree\+\_\+cycle}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}q)
\begin{DoxyCompactList}\small\item\em Sets the quadtree\textquotesingle{}s index to 0. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \mbox{\hyperlink{group__Eina__Quadtree__Group_gafb5977cb8a9afc3c374d6be3cba82134}{eina\+\_\+quadtree\+\_\+increase}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Increases the index of the quadtree item by one. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Quadtree__Group_gae08d65166a69f9e75e4c57036812a2b9}{eina\+\_\+quadtree\+\_\+add}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}q, const void \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Inserts a data object into the quadtree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Quadtree__Group_gad431f20dceb85127549b8b1ef1185b8e}{eina\+\_\+quadtree\+\_\+del}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Deletes a given quadtree item from the quadtree. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga95c08e61d9ef49b8e0cb2ad7bac68582}{eina\+\_\+quadtree\+\_\+change}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Marks an object within the quadtree as needing changed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga02f36f26f11ed1e28884dafb9b060284}{eina\+\_\+quadtree\+\_\+hide}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Sets {\ttfamily object} invisible. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Eina__Quadtree__Group_gab9ab17ff547f0291b0a1750db9c82e5c}{eina\+\_\+quadtree\+\_\+show}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}object)
\begin{DoxyCompactList}\small\item\em Sets {\ttfamily object} to visible. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga43e2861e0406632ef2b6b97a2126413e}{eina\+\_\+quadtree\+\_\+collide}} (\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}q, int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Retrieves items in quadtree inside the target geometry. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga641f45270f02b38c16d8f73b00df1a03}{eina\+\_\+quadtree\+\_\+object}} (\mbox{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}} \texorpdfstring{$\ast$}{*}list)
\begin{DoxyCompactList}\small\item\em Retrieves the quadtree item\textquotesingle{}s data for the given inline list. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsubsection{Detailed Description}


Quadtree operations. 

\doxysubsubsubsection{Typedef Documentation}
\Hypertarget{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}\label{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06} 
\index{Quadtrees@{Quadtrees}!Eina\_QuadTree@{Eina\_QuadTree}}
\index{Eina\_QuadTree@{Eina\_QuadTree}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{Eina\_QuadTree}{Eina\_QuadTree}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}}}



A quadtree is a data structure where each node contains four child nodes. 

It can be used to partition 2D spaces through subdivision into quadrants. \Hypertarget{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}\label{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950} 
\index{Quadtrees@{Quadtrees}!Eina\_Quad\_Callback@{Eina\_Quad\_Callback}}
\index{Eina\_Quad\_Callback@{Eina\_Quad\_Callback}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{Eina\_Quad\_Callback}{Eina\_Quad\_Callback}}
{\footnotesize\ttfamily Eina\+\_\+\+Quad\+\_\+\+Callback}



Signature for a callback routine used to determine the location of an object within a quadtree. 

These are used in sorting by determining where in the tree the given data {\ttfamily object} belongs, using {\ttfamily middle} as the division line for the two halves of the space. 

\doxysubsubsubsection{Function Documentation}
\Hypertarget{group__Eina__Quadtree__Group_ga05a2e24db89db3e9c56c5c660810b4e0}\label{group__Eina__Quadtree__Group_ga05a2e24db89db3e9c56c5c660810b4e0} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_new@{eina\_quadtree\_new}}
\index{eina\_quadtree\_new@{eina\_quadtree\_new}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_new()}{eina\_quadtree\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*} eina\+\_\+quadtree\+\_\+new (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{w,  }\item[{size\+\_\+t}]{h,  }\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}{Eina\+\_\+\+Quad\+\_\+\+Callback}}}]{vertical,  }\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gab47b57a0613e476d8c5fa250fe256950}{Eina\+\_\+\+Quad\+\_\+\+Callback}}}]{horizontal }\end{DoxyParamCaption})}



Constructs a quadtree object. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em w} & The geometric width of the quadtree. \\
\hline
\mbox{\texttt{ in}}  & {\em h} & The geometric height of the quadtree. \\
\hline
\mbox{\texttt{ in}}  & {\em vertical} & The callback for vertical direction determination. \\
\hline
\mbox{\texttt{ in}}  & {\em horizontal} & The callback for horizontal direction determination. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The newly allocated and initialized quadtree, or {\ttfamily NULL} on error.
\end{DoxyReturn}
The vertical and horizontal callbacks are used to assist in determining which quadrant a given data item belongs to. 

References \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_ga02d40a1a5679741c8f487b7494cbceca}\label{group__Eina__Quadtree__Group_ga02d40a1a5679741c8f487b7494cbceca} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_free@{eina\_quadtree\_free}}
\index{eina\_quadtree\_free@{eina\_quadtree\_free}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_free()}{eina\_quadtree\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+quadtree\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}}]{q }\end{DoxyParamCaption})}



Destructs quadtree and its data. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em q} & The quadtree to be freed.\\
\hline
\end{DoxyParams}
Frees the memory for the Eina\+\_\+\+Quad\+Tree object, and any memory used by its change tracking and garbage collection internals. 

References \mbox{\hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{EINA\+\_\+\+INLIST\+\_\+\+CONTAINER\+\_\+\+GET}}, \mbox{\hyperlink{group__Eina__List__Group_gae27a2c686a0a11693f9b06957c9bba83}{EINA\+\_\+\+LIST\+\_\+\+FREE}}, \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, and \mbox{\hyperlink{struct__Eina__Inlist_ae95deba8e271f94f8ad8aecf7fdb5dde}{\+\_\+\+Eina\+\_\+\+Inlist\+::next}}.

\Hypertarget{group__Eina__Quadtree__Group_gaa1951a153f10e5e008d582f2eab6ba8b}\label{group__Eina__Quadtree__Group_gaa1951a153f10e5e008d582f2eab6ba8b} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_resize@{eina\_quadtree\_resize}}
\index{eina\_quadtree\_resize@{eina\_quadtree\_resize}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_resize()}{eina\_quadtree\_resize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+quadtree\+\_\+resize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}}]{q,  }\item[{size\+\_\+t}]{w,  }\item[{size\+\_\+t}]{h }\end{DoxyParamCaption})}



Changes the width and height of the quadtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em q} & The quadtree to resize. \\
\hline
\mbox{\texttt{ in}}  & {\em w} & The new geometric width for the quadtree. \\
\hline
\mbox{\texttt{ in}}  & {\em h} & The new geometric height for the quadtree.\\
\hline
\end{DoxyParams}
Sets the width and height of the quadtree, but the actual update is done lazily. 

References \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_gacc0b887439b5a934f199a03ae41766b3}\label{group__Eina__Quadtree__Group_gacc0b887439b5a934f199a03ae41766b3} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_cycle@{eina\_quadtree\_cycle}}
\index{eina\_quadtree\_cycle@{eina\_quadtree\_cycle}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_cycle()}{eina\_quadtree\_cycle()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+quadtree\+\_\+cycle (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}}]{q }\end{DoxyParamCaption})}



Sets the quadtree\textquotesingle{}s index to 0. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em q} & The quadtree to cycle. \\
\hline
\end{DoxyParams}
\Hypertarget{group__Eina__Quadtree__Group_gafb5977cb8a9afc3c374d6be3cba82134}\label{group__Eina__Quadtree__Group_gafb5977cb8a9afc3c374d6be3cba82134} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_increase@{eina\_quadtree\_increase}}
\index{eina\_quadtree\_increase@{eina\_quadtree\_increase}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_increase()}{eina\_quadtree\_increase()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void eina\+\_\+quadtree\+\_\+increase (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Increases the index of the quadtree item by one. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em object} & The quadtree item to increase.\\
\hline
\end{DoxyParams}
If necessary, records that the root is no longer sorted. 

References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}.

\Hypertarget{group__Eina__Quadtree__Group_gae08d65166a69f9e75e4c57036812a2b9}\label{group__Eina__Quadtree__Group_gae08d65166a69f9e75e4c57036812a2b9} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_add@{eina\_quadtree\_add}}
\index{eina\_quadtree\_add@{eina\_quadtree\_add}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_add()}{eina\_quadtree\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*} eina\+\_\+quadtree\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}}]{q,  }\item[{const void \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Inserts a data object into the quadtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em q} & The quadtree to add {\ttfamily object} to. \\
\hline
\mbox{\texttt{ in}}  & {\em object} & A data object to store in the quadtree. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pointer to the stored quadtree item.
\end{DoxyReturn}
Creates an Eina\+\_\+\+Quad\+Tree\+\_\+\+Item (or recycles one from the quadtree\textquotesingle{}s trash) and stores the data {\ttfamily object} in it, then arranges to lazily insert the item into the quadtree (i.\+e. insertion is delayed until it needs to be used.) 

References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Inline__List__Group_gaef650e653f43178ecfee2c661bea7a85}{eina\+\_\+inlist\+\_\+append()}}, \mbox{\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\+\_\+\+INLIST\+\_\+\+GET}}, \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_gad431f20dceb85127549b8b1ef1185b8e}\label{group__Eina__Quadtree__Group_gad431f20dceb85127549b8b1ef1185b8e} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_del@{eina\_quadtree\_del}}
\index{eina\_quadtree\_del@{eina\_quadtree\_del}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_del()}{eina\_quadtree\_del()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+quadtree\+\_\+del (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Deletes a given quadtree item from the quadtree. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em object} & The quadtree item to be deleted. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} on success, \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE} otherwise.
\end{DoxyReturn}
Moves the item to the quadtree\textquotesingle{}s internal garbage heap for later reclamation. 

References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__List__Group_ga6e81c26272c54177d087b29c965af4d8}{eina\+\_\+list\+\_\+remove()}}, \mbox{\hyperlink{group__Eina__Magic__Group_ga470f5ce28eaaf59ce80523be8471c5e0}{EINA\+\_\+\+MAGIC\+\_\+\+SET}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_ga95c08e61d9ef49b8e0cb2ad7bac68582}\label{group__Eina__Quadtree__Group_ga95c08e61d9ef49b8e0cb2ad7bac68582} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_change@{eina\_quadtree\_change}}
\index{eina\_quadtree\_change@{eina\_quadtree\_change}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_change()}{eina\_quadtree\_change()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+quadtree\+\_\+change (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Marks an object within the quadtree as needing changed. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em object} & The object that has changed. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} if change successfully noted, or \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE} otherwise. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Inline__List__Group_gaef650e653f43178ecfee2c661bea7a85}{eina\+\_\+inlist\+\_\+append()}}, \mbox{\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\+\_\+\+INLIST\+\_\+\+GET}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.



Referenced by \mbox{\hyperlink{group__Eina__Quadtree__Group_gab9ab17ff547f0291b0a1750db9c82e5c}{eina\+\_\+quadtree\+\_\+show()}}.

\Hypertarget{group__Eina__Quadtree__Group_ga02f36f26f11ed1e28884dafb9b060284}\label{group__Eina__Quadtree__Group_ga02f36f26f11ed1e28884dafb9b060284} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_hide@{eina\_quadtree\_hide}}
\index{eina\_quadtree\_hide@{eina\_quadtree\_hide}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_hide()}{eina\_quadtree\_hide()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+quadtree\+\_\+hide (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Sets {\ttfamily object} invisible. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em object} & The item within the quadtree to hide. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} if {\ttfamily object} was successfully hidden, or \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE} if it wasn\textquotesingle{}t in the quadtree. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_gab9ab17ff547f0291b0a1750db9c82e5c}\label{group__Eina__Quadtree__Group_gab9ab17ff547f0291b0a1750db9c82e5c} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_show@{eina\_quadtree\_show}}
\index{eina\_quadtree\_show@{eina\_quadtree\_show}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_show()}{eina\_quadtree\_show()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} eina\+\_\+quadtree\+\_\+show (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_gacd18286b711881b921e3d8746271c5b0}{Eina\+\_\+\+Quad\+Tree\+\_\+\+Item}} \texorpdfstring{$\ast$}{*}}]{object }\end{DoxyParamCaption})}



Sets {\ttfamily object} to visible. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em object} & The item within the quadtree to show. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxylink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE} if {\ttfamily object} was successfully shown, or \doxylink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE} if it wasn\textquotesingle{}t in the quadtree. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Quadtree__Group_ga95c08e61d9ef49b8e0cb2ad7bac68582}{eina\+\_\+quadtree\+\_\+change()}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\Hypertarget{group__Eina__Quadtree__Group_ga43e2861e0406632ef2b6b97a2126413e}\label{group__Eina__Quadtree__Group_ga43e2861e0406632ef2b6b97a2126413e} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_collide@{eina\_quadtree\_collide}}
\index{eina\_quadtree\_collide@{eina\_quadtree\_collide}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_collide()}{eina\_quadtree\_collide()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} \mbox{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}} \texorpdfstring{$\ast$}{*} eina\+\_\+quadtree\+\_\+collide (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Quadtree__Group_ga441f644b2f5b17b6f7c4db0e2738fc06}{Eina\+\_\+\+Quad\+Tree}} \texorpdfstring{$\ast$}{*}}]{q,  }\item[{int}]{x,  }\item[{int}]{y,  }\item[{int}]{w,  }\item[{int}]{h }\end{DoxyParamCaption})}



Retrieves items in quadtree inside the target geometry. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em q} & The quadtree to recompute. \\
\hline
\mbox{\texttt{ in}}  & {\em x} & New target X coordinate. \\
\hline
\mbox{\texttt{ in}}  & {\em y} & New target Y coordinate. \\
\hline
\mbox{\texttt{ in}}  & {\em w} & New target width. \\
\hline
\mbox{\texttt{ in}}  & {\em h} & New target height. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The list of collided items or {\ttfamily NULL} on error.
\end{DoxyReturn}
Forces a rebuild and resort of the quadtree if needed due to pending changes, then performs a collision detection to find items whose geometry is contained within or intersects the given target geometry. 

References \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\+\_\+\+FALSE}}, \mbox{\hyperlink{group__Eina__Rectangle__Group_gaaceb5b08727a052cc814a92569fcf8da}{EINA\+\_\+\+RECTANGLE\+\_\+\+SET}}, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}, \mbox{\hyperlink{struct__Eina__Rectangle_a7570ed17f58fc94be997414a86130074}{\+\_\+\+Eina\+\_\+\+Rectangle\+::h}}, \mbox{\hyperlink{struct__Eina__Rectangle_af6a92d51ec25ee3464c81297ffc3a330}{\+\_\+\+Eina\+\_\+\+Rectangle\+::w}}, \mbox{\hyperlink{struct__Eina__Rectangle_a8358c0791dcf476432687510ca4e5d5c}{\+\_\+\+Eina\+\_\+\+Rectangle\+::x}}, and \mbox{\hyperlink{struct__Eina__Rectangle_ae74dc834fb71a1f4cd9e3fe11dec3940}{\+\_\+\+Eina\+\_\+\+Rectangle\+::y}}.

\Hypertarget{group__Eina__Quadtree__Group_ga641f45270f02b38c16d8f73b00df1a03}\label{group__Eina__Quadtree__Group_ga641f45270f02b38c16d8f73b00df1a03} 
\index{Quadtrees@{Quadtrees}!eina\_quadtree\_object@{eina\_quadtree\_object}}
\index{eina\_quadtree\_object@{eina\_quadtree\_object}!Quadtrees@{Quadtrees}}
\doxysubsubsubsubsection{\texorpdfstring{eina\_quadtree\_object()}{eina\_quadtree\_object()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga6ac08753ba12bc9c7a0390cf67868f4f}{EINA\+\_\+\+API}} void \texorpdfstring{$\ast$}{*} eina\+\_\+quadtree\+\_\+object (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Eina__Inline__List__Group_gad93973c87f867f249482e936797096ad}{Eina\+\_\+\+Inlist}} \texorpdfstring{$\ast$}{*}}]{list }\end{DoxyParamCaption})}



Retrieves the quadtree item\textquotesingle{}s data for the given inline list. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em list} & The inline list item to lookup \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The contained data object in the Eina\+\_\+\+Quad\+Tree\+\_\+\+Item, or {\ttfamily NULL} if none could be found. 
\end{DoxyReturn}


References \mbox{\hyperlink{group__Eina__Inline__List__Group_ga8c4e6011e7caa9ec5c22b003c4950338}{EINA\+\_\+\+INLIST\+\_\+\+CONTAINER\+\_\+\+GET}}.

