\doxysection{Nav\+Triangulation.\+hpp}
\hypertarget{NavTriangulation_8hpp_source}{}\label{NavTriangulation_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavTriangulation.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavTriangulation.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_NAVTRIANGULATION\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_NAVTRIANGULATION\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}Color.hpp"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}Geometry.hpp"{}}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNavGrid}{NavGrid}};}
\DoxyCodeLine{00008\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classConnection}{Connection}};}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNavTri}{NavTri}}}
\DoxyCodeLine{00012\ \{}
\DoxyCodeLine{00013\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00014\ \ \ \ \ \textcolor{keyword}{const}\ Triangle\_2\&\ getTriangle()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mTri;\ \}}
\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classColor}{Color}}\&\ getColor()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mColor;\ \}}
\DoxyCodeLine{00016\ \ \ \ \ \textcolor{keywordtype}{void}\ setVertices(\textcolor{keyword}{const}\ Point\_2\ *);}
\DoxyCodeLine{00017\ \ \ \ \ \textcolor{keywordtype}{void}\ setColor(\mbox{\hyperlink{classColor}{Color}}\ c)\ \{\ mColor\ =\ c;\ \}}
\DoxyCodeLine{00018\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00019\ \ \ \ \ Triangle\_2\ mTri;}
\DoxyCodeLine{00020\ \ \ \ \ \mbox{\hyperlink{classColor}{Color}}\ mColor;}
\DoxyCodeLine{00021\ \};}
\DoxyCodeLine{00022\ }
\DoxyCodeLine{00024\ \textcolor{keyword}{class\ }NavTriangulation}
\DoxyCodeLine{00025\ \{}
\DoxyCodeLine{00026\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00027\ \ \ \ \ NavTriangulation(\mbox{\hyperlink{classNavGrid}{NavGrid}}\ \&nav)\ :\ mNav(nav)\ \{\ \}}
\DoxyCodeLine{00028\ \ \ \ \ \textcolor{keyword}{virtual}\ \string~NavTriangulation();}
\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{virtual}\ uint\ getNavIdx(\textcolor{keyword}{const}\ Point\_2\&,\ uint\ z)\ \textcolor{keyword}{const}\ =\ 0;}
\DoxyCodeLine{00030\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{bool}\ findPathAStar(std::vector<NavTri\ *>\ \&searchArea,\ \mbox{\hyperlink{classConnection}{Connection}}\&)\ =\ 0;}
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ insertRoute(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&)\ =\ 0;}
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{virtual}\ \textcolor{keywordtype}{void}\ removeRoute(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&)\ =\ 0;}
\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<NavTri>\&\ getNavTris()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mNavTris;\ \}}
\DoxyCodeLine{00034\ \ \ \ \ uint16\_t\ incSearchSeq()\ \{\ assert(mSearchSeq\ <\ 0xfffe\ \&\&\ \textcolor{stringliteral}{"{}FIXME:\ Wipe\ sequence\ numbers!"{}});\ \textcolor{keywordflow}{return}\ ++mSearchSeq;\ \}}
\DoxyCodeLine{00035\ \ \ \ \ uint16\_t\ getSearchSeq()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSearchSeq;\ \}}
\DoxyCodeLine{00036\ \ \ \ \ \mbox{\hyperlink{classNavTri}{NavTri}}\&\ getNavTri(uint\ i)\ \{\ \textcolor{keywordflow}{return}\ mNavTris[i];\ \}}
\DoxyCodeLine{00037\ \ \ \ \ \mbox{\hyperlink{classNavTri}{NavTri}}\ *getNavTri(\textcolor{keyword}{const}\ Point\_2\ \&v,\ uint\ z)\ \{\ \textcolor{keyword}{auto}\ i\ =\ getNavIdx(v,\ z);\ \textcolor{keywordflow}{return}\ (i\ <\ mNavTris.size())\ ?\ \&mNavTris[i]\ :\ 0;\ \}}
\DoxyCodeLine{00038\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavTri}{NavTri}}\&\ getNavTri(uint\ i)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mNavTris[i];\ \}}
\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavTri}{NavTri}}\ *getNavTri(\textcolor{keyword}{const}\ Point\_2\ \&v,\ uint\ z)\textcolor{keyword}{\ const\ }\{\ \textcolor{keyword}{auto}\ i\ =\ getNavIdx(v,\ z);\ \textcolor{keywordflow}{return}\ (i\ <\ mNavTris.size())\ ?\ \&mNavTris[i]\ :\ 0;\ \}}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{virtual}\ PyObject\ *getFaceGraphPy()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ 0;\ \}}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{virtual}\ PyObject\ *getLineGraphPy()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ 0;\ \}}
\DoxyCodeLine{00042\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00043\ \ \ \ \ \mbox{\hyperlink{classNavGrid}{NavGrid}}\ \&mNav;}
\DoxyCodeLine{00044\ \ \ \ \ std::vector<NavTri>\ mNavTris;}
\DoxyCodeLine{00045\ \ \ \ \ uint\ mZ0\{0\};}
\DoxyCodeLine{00046\ \ \ \ \ uint\ mZ1\{0\};}
\DoxyCodeLine{00047\ \ \ \ \ uint16\_t\ mSearchSeq\{0\};}
\DoxyCodeLine{00048\ \};}
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00050\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ NavTri::setVertices(\textcolor{keyword}{const}\ Point\_2\ *v)}
\DoxyCodeLine{00051\ \{}
\DoxyCodeLine{00052\ \ \ \ \ mTri\ =\ Triangle\_2(v[0],\ v[1],\ v[2]);}
\DoxyCodeLine{00053\ \}}
\DoxyCodeLine{00054\ }
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_NAVTRIANGULATION\_H}}

\end{DoxyCode}
