\doxysection{Nav\+Grid.\+hpp}
\hypertarget{NavGrid_8hpp_source}{}\label{NavGrid_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavGrid.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavGrid.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_NAVGRID\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_NAVGRID\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}NavPoint.hpp"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}Rasterizer.hpp"{}}}
\DoxyCodeLine{00006\ \textcolor{comment}{//\#include\ "{}Util/HugePageAllocator.hpp"{}}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00017\ }
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPCBoard}{PCBoard}};}
\DoxyCodeLine{00021\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classComponent}{Component}};}
\DoxyCodeLine{00022\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPin}{Pin}};}
\DoxyCodeLine{00023\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPath}{Path}};}
\DoxyCodeLine{00024\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classConnection}{Connection}};}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00029\ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ CanSafelyEraseOverlappingSegments\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00032\ \textcolor{keyword}{struct\ }NavSpacings}
\DoxyCodeLine{00033\ \{}
\DoxyCodeLine{00034\ \ \ \ \ Real\ Clearance;}
\DoxyCodeLine{00035\ \ \ \ \ Real\ TrackWidthHalf;}
\DoxyCodeLine{00036\ \ \ \ \ Real\ ViaRadius;}
\DoxyCodeLine{00037\ \ \ \ \ NavSpacings()\ \{\ \}}
\DoxyCodeLine{00038\ \ \ \ \ NavSpacings(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&);}
\DoxyCodeLine{00039\ \ \ \ \ \textcolor{keywordtype}{bool}\ initialized()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !std::isnan(Clearance);\ \}}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keywordtype}{bool}\ operator==(\textcolor{keyword}{const}\ NavSpacings\ \&that)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ Clearance\ ==\ that.Clearance\ \&\&\ TrackWidthHalf\ ==\ that.TrackWidthHalf\ \&\&\ ViaRadius\ ==\ that.ViaRadius;\ \}}
\DoxyCodeLine{00042\ \ \ \ \ Real\ \mbox{\hyperlink{structNavSpacings_aa845f802decd5480890b66f625be59b3}{getExpansionForTracks}}(Real\ clearance)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00043\ \ \ \ \ Real\ getExpansionForVias(Real\ clarance)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00044\ \};}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structAStarCosts}{AStarCosts}}}
\DoxyCodeLine{00047\ \{}
\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keywordtype}{float}\ MaskedLayer;}
\DoxyCodeLine{00049\ \ \ \ \ \textcolor{keywordtype}{float}\ Via;}
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{float}\ Violation;}
\DoxyCodeLine{00051\ \ \ \ \ \textcolor{keywordtype}{float}\ WrongDirection;}
\DoxyCodeLine{00052\ \ \ \ \ \textcolor{keywordtype}{void}\ reset();}
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{void}\ setViolationCostInf()\ \{\ Violation\ =\ std::numeric\_limits<float>::infinity();\ \}}
\DoxyCodeLine{00054\ \ \ \ \ \textcolor{keywordtype}{void}\ setXYBiasNone()\ \{\ WrongDirection\ =\ 1.0f;\ \}}
\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keywordtype}{bool}\ valid()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ MaskedLayer\ >=\ 0.0f\ \&\&\ Via\ >=\ 0.0f\ \&\&\ Violation\ >=\ 0.0f\ \&\&\ WrongDirection\ >=\ 0.0f;\ \}}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{void}\ setPy(PyObject\ *);}
\DoxyCodeLine{00057\ \};}
\DoxyCodeLine{00058\ }
\DoxyCodeLine{00060\ \textcolor{keyword}{class\ }NavGrid\ :\ \textcolor{keyword}{public}\ UniformGrid25}
\DoxyCodeLine{00061\ \{}
\DoxyCodeLine{00062\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00063\ \ \ \ \ NavGrid(\mbox{\hyperlink{classPCBoard}{PCBoard}}\&);}
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPCBoard}{PCBoard}}\&\ getPCB()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mPCB;\ \}}
\DoxyCodeLine{00065\ \ \ \ \ \mbox{\hyperlink{classPCBoard}{PCBoard}}\&\ getPCB()\ \{\ \textcolor{keywordflow}{return}\ mPCB;\ \}}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keywordtype}{void}\ build();}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{void}\ copyFrom(\textcolor{keyword}{const}\ NavGrid\&);}
\DoxyCodeLine{00069\ }
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{const}\ std::vector<NavPoint>\&\ getPoints()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mPoints;\ \}}
\DoxyCodeLine{00071\ \ \ \ \ std::vector<NavPoint>\&\ getPoints()\ \{\ \textcolor{keywordflow}{return}\ mPoints;\ \}}
\DoxyCodeLine{00072\ \ \ \ \ uint\ getNumPoints()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mPoints.size();\ \}}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ getPoint(uint\ i)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mPoints[i];\ \}}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ getPoint(uint\ x,\ uint\ y,\ uint\ z)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getPoint(\textcolor{keyword}{const}\ Point\_2\&,\ uint\ z)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getPoint(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ \&v)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ getPoint(v.xy(),\ v.z());\ \}}
\DoxyCodeLine{00078\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ getPoint(uint\ i)\ \{\ \textcolor{keywordflow}{return}\ mPoints[i];\ \}}
\DoxyCodeLine{00079\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ getPoint(uint\ x,\ uint\ y,\ uint\ z);}
\DoxyCodeLine{00080\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ getPoint(\textcolor{keyword}{const}\ \mbox{\hyperlink{classIPoint__3}{IPoint\_3}}\ \&v)\ \{\ \textcolor{keywordflow}{return}\ getPoint(v.x,\ v.y,\ v.z);\ \}}
\DoxyCodeLine{00081\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getPoint(\textcolor{keyword}{const}\ Point\_2\&,\ uint\ z);}
\DoxyCodeLine{00082\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getPoint(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ \&v)\ \{\ \textcolor{keywordflow}{return}\ getPoint(v.xy(),\ v.z());\ \}}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{int}\ getDirectionStride(\mbox{\hyperlink{classGridDirection}{GridDirection}}\ d)\textcolor{keyword}{\ const\ }\{\ assert(d.n()\ <=\ 9);\ \textcolor{keywordflow}{return}\ mDirectionStride[d.n()];\ \}}
\DoxyCodeLine{00084\ \ \ \ \ uint32\_t\ getAddressOffset(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *nav)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00085\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getPointFromAddressOffset(uint32\_t);}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavSpacings}{NavSpacings}}\&\ getSpacings()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSpacings;\ \}}
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keywordtype}{bool}\ setSpacings(\textcolor{keyword}{const}\ \mbox{\hyperlink{structNavSpacings}{NavSpacings}}\&);}
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{void}\ initSpacingsForAnyRoutedTrack();}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{void}\ resetKeepouts();}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{void}\ resetKeepoutsRRR();}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classComponent}{Component}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPin}{Pin}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00095\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterizeCompound(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPin}{Pin}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterizeLayoutAreaBorder(\textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&,\ uint\ rasterizeMask);}
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPath}{Path}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00100\ }
\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keywordtype}{void}\ getCosts(std::vector<float>\&,\ uint\ index);}
\DoxyCodeLine{00102\ \ \ \ \ \textcolor{keywordtype}{void}\ setCosts(uint\ index,\ \textcolor{keywordtype}{float},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structIBox__3}{IBox\_3}}\&);}
\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keywordtype}{void}\ setCosts(uint\ index,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ *,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structIBox__3}{IBox\_3}}\&);}
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{void}\ setCosts(uint\ index,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ *);}
\DoxyCodeLine{00105\ \ \ \ \ \mbox{\hyperlink{structAStarCosts}{AStarCosts}}\&\ getAStarCosts()\ \{\ \textcolor{keywordflow}{return}\ mAStarCosts;\ \}}
\DoxyCodeLine{00106\ \ \ \ \ \textcolor{keywordtype}{bool}\ findPathAStar(\mbox{\hyperlink{classConnection}{Connection}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structAStarCosts}{AStarCosts}}\ *);}
\DoxyCodeLine{00107\ \ \ \ \ Real\ sumViolationArea(\textcolor{keyword}{const}\ \mbox{\hyperlink{classConnection}{Connection}}\&);}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \ \ \ \ uint16\_t\ nextRasterSeq();}
\DoxyCodeLine{00110\ \ \ \ \ uint16\_t\ nextSearchSeq();}
\DoxyCodeLine{00111\ \ \ \ \ uint16\_t\ getSearchSeq()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSearchSeq;\ \}}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \ \ \ \ std::string\ str(\textcolor{keyword}{const}\ \mbox{\hyperlink{structIBox__3}{IBox\_3}}\ *\ =\ 0)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00114\ \ \ \ \ PyObject\ *getPy(\textcolor{keyword}{const}\ \mbox{\hyperlink{structIBox__3}{IBox\_3}}\&)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00115\ \ \ \ \ PyObject\ *getPathCoordinatesNumpy(\textcolor{keyword}{const}\ \mbox{\hyperlink{classTrack}{Track}}\&)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00118\ \ \ \ \ \mbox{\hyperlink{classPCBoard}{PCBoard}}\ \&mPCB;}
\DoxyCodeLine{00119\ \ \ \ \ std::vector<NavPoint>\ mPoints;}
\DoxyCodeLine{00120\ \ \ \ \ \mbox{\hyperlink{structNavSpacings}{NavSpacings}}\ mSpacings;}
\DoxyCodeLine{00121\ \ \ \ \ \textcolor{comment}{//\ We\ use\ these\ to\ look\ up\ the\ addresses\ of\ neighbours\ in\ the\ grid\ because\ NavPoint\ doesn't\ have\ edge\ pointers\ (to\ save\ space).}}
\DoxyCodeLine{00122\ \ \ \ \ \textcolor{keywordtype}{int}\ mDirectionStride[10];}
\DoxyCodeLine{00123\ \ \ \ \ \mbox{\hyperlink{structAStarCosts}{AStarCosts}}\ mAStarCosts;}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00126\ \ \ \ \ \textcolor{keywordtype}{void}\ initDirectionStrides();}
\DoxyCodeLine{00127\ \ \ \ \ \textcolor{keywordtype}{void}\ initEdges(\mbox{\hyperlink{classNavPoint}{NavPoint}}\&,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classIPoint__3}{IPoint\_3}}\&);}
\DoxyCodeLine{00128\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterizeFootprints();}
\DoxyCodeLine{00129\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterizeClearanceAreas();}
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordtype}{void}\ rasterize(\textcolor{keyword}{const}\ \mbox{\hyperlink{classAShape}{AShape}}\ *,\ uint\ Z0,\ uint\ Z1,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00132\ \ \ \ \ uint16\_t\ mSearchSeq\{0\};}
\DoxyCodeLine{00133\ \ \ \ \ uint16\_t\ mRasterSeq\{0\};}
\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordtype}{void}\ resetSearchSeq();}
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keywordtype}{void}\ resetRasterSeq();}
\DoxyCodeLine{00136\ \};}
\DoxyCodeLine{00137\ }
\DoxyCodeLine{00138\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ NavGrid::getPoint(uint\ x,\ uint\ y,\ uint\ z)}
\DoxyCodeLine{00139\ \{}
\DoxyCodeLine{00140\ \ \ \ \ \textcolor{keywordflow}{return}\ mPoints.at(LinearIndex(z,y,x));}
\DoxyCodeLine{00141\ \}}
\DoxyCodeLine{00142\ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&\ NavGrid::getPoint(uint\ x,\ uint\ y,\ uint\ z)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00143\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00144\ \ \ \ \ \textcolor{keywordflow}{return}\ mPoints.at(LinearIndex(z,y,x));}
\DoxyCodeLine{00145\ \}}
\DoxyCodeLine{00146\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *NavGrid::getPoint(\textcolor{keyword}{const}\ Point\_2\ \&v,\ uint\ z)}
\DoxyCodeLine{00147\ \{}
\DoxyCodeLine{00148\ \ \ \ \ \textcolor{keyword}{const}\ uint\ x\ =\ XIndex(v.x(),\ 0.0);}
\DoxyCodeLine{00149\ \ \ \ \ \textcolor{keyword}{const}\ uint\ y\ =\ YIndex(v.y(),\ 0.0);}
\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordflow}{return}\ inside(x,y,z)\ ?\ \&getPoint(x,\ y,\ z)\ :\ 0;}
\DoxyCodeLine{00151\ \}}
\DoxyCodeLine{00152\ \textcolor{keyword}{inline}\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *NavGrid::getPoint(\textcolor{keyword}{const}\ Point\_2\ \&v,\ uint\ z)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00153\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00154\ \ \ \ \ \textcolor{keyword}{const}\ uint\ x\ =\ XIndex(v.x(),\ 0.0);}
\DoxyCodeLine{00155\ \ \ \ \ \textcolor{keyword}{const}\ uint\ y\ =\ YIndex(v.y(),\ 0.0);}
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordflow}{return}\ inside(x,y,z)\ ?\ \&getPoint(x,\ y,\ z)\ :\ 0;}
\DoxyCodeLine{00157\ \}}
\DoxyCodeLine{00158\ }
\DoxyCodeLine{00159\ \textcolor{keyword}{inline}\ uint16\_t\ NavGrid::nextSearchSeq()}
\DoxyCodeLine{00160\ \{}
\DoxyCodeLine{00161\ \ \ \ \ \textcolor{keywordflow}{if}\ (mSearchSeq\ ==\ 0x7fff)\ \textcolor{comment}{//\ 0x8000\ is\ used\ to\ indicate\ that\ a\ point\ is\ on\ A-\/star's\ open\ list}}
\DoxyCodeLine{00162\ \ \ \ \ \ \ \ \ resetSearchSeq();}
\DoxyCodeLine{00163\ \ \ \ \ \textcolor{keywordflow}{return}\ ++mSearchSeq;}
\DoxyCodeLine{00164\ \}}
\DoxyCodeLine{00165\ \textcolor{keyword}{inline}\ uint16\_t\ NavGrid::nextRasterSeq()}
\DoxyCodeLine{00166\ \{}
\DoxyCodeLine{00167\ \ \ \ \ \textcolor{keywordflow}{if}\ (mRasterSeq\ ==\ 0xffff)}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ resetRasterSeq();}
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordflow}{return}\ ++mRasterSeq;}
\DoxyCodeLine{00170\ \}}
\DoxyCodeLine{00171\ }
\DoxyCodeLine{00172\ \textcolor{keyword}{inline}\ Real\ \mbox{\hyperlink{structNavSpacings_aa845f802decd5480890b66f625be59b3}{NavSpacings::getExpansionForTracks}}(Real\ clearance)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00173\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00174\ \ \ \ \ \textcolor{keywordflow}{return}\ std::max(Clearance,\ clearance)\ +\ TrackWidthHalf;}
\DoxyCodeLine{00175\ \}}
\DoxyCodeLine{00176\ \textcolor{keyword}{inline}\ Real\ NavSpacings::getExpansionForVias(Real\ clearance)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00177\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00178\ \ \ \ \ \textcolor{keywordflow}{return}\ std::max(Clearance,\ clearance)\ +\ ViaRadius;}
\DoxyCodeLine{00179\ \}}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *NavPoint::getEdge(\mbox{\hyperlink{classNavGrid}{NavGrid}}\ \&nav,\ \mbox{\hyperlink{classGridDirection}{GridDirection}}\ d)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00182\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordtype}{char}\ *\_this\ =\ \textcolor{keyword}{const\_cast<}\textcolor{keywordtype}{char}\ *\textcolor{keyword}{>}(\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{char}\ *\textcolor{keyword}{>}(\textcolor{keyword}{this}));}
\DoxyCodeLine{00184\ \ \ \ \ \textcolor{keywordflow}{if}\ (!hasEdge(d))}
\DoxyCodeLine{00185\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{reinterpret\_cast<}NavPoint\ *\textcolor{keyword}{>}(\_this\ +\ nav.getDirectionStride(d));}
\DoxyCodeLine{00187\ \}}
\DoxyCodeLine{00188\ }
\DoxyCodeLine{00189\ \textcolor{keyword}{inline}\ uint32\_t\ NavGrid::getAddressOffset(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *nav)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00190\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00191\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *base\ =\ \textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{char}\ *\textcolor{keyword}{>}(\&mPoints[0]);}
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *addr\ =\ \textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\textcolor{keywordtype}{char}\ *\textcolor{keyword}{>}(nav);}
\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordflow}{return}\ addr\ -\/\ base;}
\DoxyCodeLine{00194\ \}}
\DoxyCodeLine{00195\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *NavGrid::getPointFromAddressOffset(uint32\_t\ offset)}
\DoxyCodeLine{00196\ \{}
\DoxyCodeLine{00197\ \ \ \ \ \textcolor{keywordtype}{char}\ *base\ =\ \textcolor{keyword}{reinterpret\_cast<}\textcolor{keywordtype}{char}\ *\textcolor{keyword}{>}(\&mPoints[0]);}
\DoxyCodeLine{00198\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{reinterpret\_cast<}NavPoint\ *\textcolor{keyword}{>}(base\ +\ offset);}
\DoxyCodeLine{00199\ \}}
\DoxyCodeLine{00200\ }
\DoxyCodeLine{00201\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_NAVGRID\_H}}

\end{DoxyCode}
