\doxysection{Nav\+Point.\+hpp}
\hypertarget{NavPoint_8hpp_source}{}\label{NavPoint_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavPoint.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/NavPoint.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_NAVPOINT\_H}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_NAVPOINT\_H}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ "{}Geometry.hpp"{}}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ "{}GridDirection.hpp"{}}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ "{}UniformGrid25.hpp"{}}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNavGrid}{NavGrid}};}
\DoxyCodeLine{00014\ }
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_NAVPOINT\_NUM\_COST\_TERMS}}
\DoxyCodeLine{00021\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_NAVPOINT\_NUM\_COST\_TERMS\ 2}}
\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00023\ }
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_BLOCKED\_TEMPORARY\ \ \ \ \ (1\ <<\ 0)\ }\textcolor{comment}{//\ blockages\ other\ than\ pins\ or\ tracks}}
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_BLOCKED\_PERMANENT\ \ \ \ \ (1\ <<\ 8)\ }\textcolor{comment}{//\ holes\ etc.}}
\DoxyCodeLine{00027\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_NO\_VIAS\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1\ <<\ 1)\ }\textcolor{comment}{//\ blockages\ other\ than\ pins\ or\ tracks\ affecting\ vias\ only}}
\DoxyCodeLine{00028\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_INSIDE\_PIN\ \ \ \ \ \ \ \ \ \ \ \ (1\ <<\ 2)\ }\textcolor{comment}{//\ cells\ covered\ by\ a\ pin}}
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_INSIDE\_COMPONENT\ \ \ \ \ \ (1\ <<\ 3)\ }\textcolor{comment}{//\ cells\ inside\ a\ component\ footprint}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_PIN\_TRACK\_CLEARANCE\ \ \ (1\ <<\ 4)\ }\textcolor{comment}{//\ keepout\ area\ for\ tracks\ stemming\ from\ pins}}
\DoxyCodeLine{00031\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_PIN\_VIA\_CLEARANCE\ \ \ \ \ (1\ <<\ 5)\ }\textcolor{comment}{//\ keepout\ area\ for\ vias\ stemming\ from\ pins}}
\DoxyCodeLine{00032\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_ROUTE\_TRACK\_CLEARANCE\ (1\ <<\ 6)\ }\textcolor{comment}{//\ keepout\ area\ for\ tracks\ stemming\ from\ other\ tracks}}
\DoxyCodeLine{00033\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_ROUTE\_VIA\_CLEARANCE\ \ \ (1\ <<\ 7)\ }\textcolor{comment}{//\ keepout\ area\ for\ vias\ stemming\ from\ other\ tracks}}
\DoxyCodeLine{00034\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_SOURCE\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1\ <<\ 9)\ }\textcolor{comment}{//\ for\ use\ by\ A*}}
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_TARGET\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1\ <<\ 10)\ }\textcolor{comment}{//\ for\ use\ by\ A*}}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAG\_ROUTE\_GUARD\ \ \ \ \ \ \ \ \ \ \ (1\ <<\ 11)\ }\textcolor{comment}{//\ to\ restrict\ routing\ area}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_PIN\_CLEARANCE\ \ \ 0x030\ }\textcolor{comment}{//\ PIN\_TRACK|VIA\_CLEARANCE}}
\DoxyCodeLine{00040\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_ROUTE\_CLEARANCE\ 0x0c0\ }\textcolor{comment}{//\ ROUTE\_TRACK|VIA\_CEARANCE}}
\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_TRACK\_CLEARANCE\ 0x050\ }\textcolor{comment}{//\ PIN|ROUTE\_TRACK\_CLEARANCE}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_VIA\_CLEARANCE\ \ \ 0x0a0\ }\textcolor{comment}{//\ PIN|ROUTE\_VIA\_CLEARANCE}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_CLEARANCE\ \ \ \ \ \ \ 0x0f0\ }\textcolor{comment}{//\ *\_CLEARANCE}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_TRACKS\_BLOCKED\ \ 0x951\ }\textcolor{comment}{//\ BLOCKED|TRACK\_CLEARANCE|GUARD}}
\DoxyCodeLine{00045\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_VIAS\_BLOCKED\ \ \ \ 0x9f3\ }\textcolor{comment}{//\ BLOCKED|NO\_VIAS|CLEARANCE|GUARD}}
\DoxyCodeLine{00046\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_VIAS\_BLOCKED\_P\ \ 0x9f2\ }\textcolor{comment}{//\ BLOCKED\_PERMANENT|NO\_VIAS|CLEARANCE|GUARD}}
\DoxyCodeLine{00047\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_ENDPOINT\ \ \ \ \ \ \ \ 0x600\ }\textcolor{comment}{//\ SOURCE|TARGET}}
\DoxyCodeLine{00048\ \textcolor{preprocessor}{\#define\ NAV\_POINT\_FLAGS\_ALL\ \ \ \ \ \ \ \ \ \ \ \ \ 0xfff}}
\DoxyCodeLine{00049\ }
\DoxyCodeLine{00052\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classAStarVisitStatus}{AStarVisitStatus}}}
\DoxyCodeLine{00053\ \{}
\DoxyCodeLine{00054\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keywordtype}{void}\ reset()\ \{\ mSeq\ =\ 0;\ \}}
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{keywordtype}{void}\ setOpen(uint16\_t\ seq)\ \{\ mSeq\ =\ seq;\ \}}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{keywordtype}{void}\ setDone(uint16\_t\ seq)\ \{\ assert(isOpen(seq));\ mSeq\ =\ seq\ |\ 0x8000;\ \}}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keywordtype}{bool}\ isSeen(uint16\_t\ seq)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ (mSeq\ \&\ 0x7fff)\ ==\ seq;\ \}}
\DoxyCodeLine{00059\ \ \ \ \ \textcolor{keywordtype}{bool}\ isOpen(uint16\_t\ seq)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSeq\ ==\ seq;\ \}}
\DoxyCodeLine{00060\ \ \ \ \ \textcolor{keywordtype}{bool}\ isDone(uint16\_t\ seq)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mSeq\ ==\ (seq\ |\ 0x8000);\ \}}
\DoxyCodeLine{00061\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00062\ \ \ \ \ uint16\_t\ mSeq\{0\};}
\DoxyCodeLine{00063\ \};}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00070\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structNavKeepoutCounts}{NavKeepoutCounts}}}
\DoxyCodeLine{00071\ \{}
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keywordtype}{void}\ setPin(int8\_t\ n)\ \ \ \ \ \ \ \ \ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ n;\ \_PinVias\ =\ n;\ Sum\ =\ 2\ *\ n;\ \}}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{void}\ setPin(int8\_t\ n,\ int8\_t\ m)\ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ n;\ \_PinVias\ =\ m;\ Sum\ =\ n\ +\ m;\ \}}
\DoxyCodeLine{00074\ \ \ \ \ \textcolor{keywordtype}{void}\ setPinTracks(int8\_t\ n)\ \ \ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ n;\ \_PinVias\ =\ 0;\ Sum\ =\ n;\ \}}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keywordtype}{void}\ setPinVias(int8\_t\ n)\ \ \ \ \ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ n;\ Sum\ =\ n;\ \}}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keywordtype}{void}\ setRoute(int8\_t\ n)\ \ \ \ \ \ \ \{\ \_RouteTracks\ =\ n;\ \_RouteVias\ =\ n;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ 0;\ Sum\ =\ 2\ *\ n;\ \}}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keywordtype}{void}\ setRoute(int8\_t\ n,\ int8\_t\ m)\ \{\ \_RouteTracks\ =\ n;\ \_RouteVias\ =\ m;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ 0;\ Sum\ =\ n\ +\ m;\ \}}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{void}\ setRouteTracks(int8\_t\ n)\ \{\ \_RouteTracks\ =\ n;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ 0;\ Sum\ =\ n;\ \}}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{void}\ setRouteVias(int8\_t\ n)\ \ \ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ n;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ 0;\ Sum\ =\ n;\ \}}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{void}\ reset()\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\ \_RouteTracks\ =\ 0;\ \_RouteVias\ =\ 0;\ \_PinTracks\ =\ 0;\ \_PinVias\ =\ 0;\ Sum\ =\ 0;\ \}}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{bool}\ isZero()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \_RouteTracks\ ==\ 0\ \&\&\ \_RouteVias\ ==\ 0\ \&\&\ \_PinTracks\ ==\ 0\ \&\&\ \_PinVias\ ==\ 0\ \&\&\ RRRTrack\ ==\ 0;\ \}}
\DoxyCodeLine{00082\ \ \ \ \ int8\_t\ \_RouteTracks\{0\};}
\DoxyCodeLine{00083\ \ \ \ \ int8\_t\ \_RouteVias\{0\};}
\DoxyCodeLine{00084\ \ \ \ \ int8\_t\ \_PinTracks\{0\};}
\DoxyCodeLine{00085\ \ \ \ \ int8\_t\ \_PinVias\{0\};}
\DoxyCodeLine{00086\ \ \ \ \ int8\_t\ Sum\{0\};}
\DoxyCodeLine{00087\ \ \ \ \ int8\_t\ RRRTrack\{0\};}
\DoxyCodeLine{00088\ \};}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00092\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}}
\DoxyCodeLine{00093\ \{}
\DoxyCodeLine{00094\ \ \ \ \ Real\ Expansion\{0.0\};\ }
\DoxyCodeLine{00095\ \ \ \ \ uint16\_t\ \mbox{\hyperlink{structNavRasterizeParams_a4940df81d2a5d6a4eabf2bf25a1fdc86}{IgnoreMask}}\{0\};\ }
\DoxyCodeLine{00096\ \ \ \ \ uint16\_t\ \mbox{\hyperlink{structNavRasterizeParams_a256b0a2c1a604811f2c38c2ef1f597b4}{FlagsAnd}}\{0xffff\};\ }
\DoxyCodeLine{00097\ \ \ \ \ uint16\_t\ \mbox{\hyperlink{structNavRasterizeParams_a9d5c0b3ec49d3c7dd55645da5312b382}{FlagsOr}}\{0\};\ }
\DoxyCodeLine{00098\ \ \ \ \ \textcolor{keyword}{mutable}\ uint16\_t\ \mbox{\hyperlink{structNavRasterizeParams_ae1290fa4bcb3ce4bc0c5b6752dad4b64}{WriteSeq}};\ }
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structNavRasterizeParams_adb5e7b5628ea35c83cc4b5d243c41f1f}{AutoExpand}}\{\textcolor{keyword}{false}\};\ }
\DoxyCodeLine{00100\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structNavRasterizeParams_ac1c98f163d59941bf3c0e07b971dab82}{AutoIncrementWriteSeq}}\{\textcolor{keyword}{true}\};}
\DoxyCodeLine{00101\ \ \ \ \ \mbox{\hyperlink{structNavKeepoutCounts}{NavKeepoutCounts}}\ KOCount;\ }
\DoxyCodeLine{00102\ \ \ \ \ int8\_t\ \mbox{\hyperlink{structNavRasterizeParams_aa0a4b3dcb6b0bbf180d3a2320da43861}{TrackRasterCount}}\{0\};}
\DoxyCodeLine{00103\ }
\DoxyCodeLine{00104\ \ \ \ \ \textcolor{keywordtype}{bool}\ isNoop()\ \textcolor{keyword}{const};}
\DoxyCodeLine{00105\ \};}
\DoxyCodeLine{00106\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ NavRasterizeParams::isNoop()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00107\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordflow}{return}\ (\mbox{\hyperlink{structNavRasterizeParams_a256b0a2c1a604811f2c38c2ef1f597b4}{FlagsAnd}}\ ==\ 0xffff)\ \&\&\ (\mbox{\hyperlink{structNavRasterizeParams_a9d5c0b3ec49d3c7dd55645da5312b382}{FlagsOr}}\ ==\ 0x0)\ \&\&\ KOCount.isZero();}
\DoxyCodeLine{00109\ \}}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00115\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classNavPoint}{NavPoint}}}
\DoxyCodeLine{00116\ \{}
\DoxyCodeLine{00117\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00118\ \ \ \ \ \textcolor{keywordtype}{void}\ setRefPoint(\textcolor{keywordtype}{int}\ x,\ \textcolor{keywordtype}{int}\ y,\ \textcolor{keywordtype}{int}\ z)\ \{\ mRefX\ =\ x;\ mRefY\ =\ y;\ mLayer\ =\ z;\ assert(x\ >=\ 0\ \&\&\ x\ <=\ 32767);\ assert(y\ >=\ 0\ \&\&\ y\ <=\ 32767);\ assert(z\ >=\ 0\ \&\&\ z\ <=\ 65535);\ \}}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ \ \ \ \ Point\_2\ getRefPoint(\textcolor{keyword}{const}\ \mbox{\hyperlink{classUniformGrid25}{UniformGrid25}}\ *nav)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ nav-\/>MidPoint(mRefX,\ mRefY);\ \}}
\DoxyCodeLine{00121\ \ \ \ \ \mbox{\hyperlink{classPoint__25}{Point\_25}}\ getRefPoint25(\textcolor{keyword}{const}\ \mbox{\hyperlink{classUniformGrid25}{UniformGrid25}}\ *nav)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classPoint__25}{Point\_25}}(getRefPoint(nav),\ mLayer);\ \}}
\DoxyCodeLine{00122\ \ \ \ \ uint8\_t\ getLayer()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mLayer;\ \}}
\DoxyCodeLine{00123\ }
\DoxyCodeLine{00124\ \ \ \ \ \textcolor{keywordtype}{bool}\ hasEdge(\mbox{\hyperlink{classGridDirection}{GridDirection}}\ d)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mEdgeMask\ \&\ (1\ <<\ d.n());\ \}}
\DoxyCodeLine{00125\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getEdge(\mbox{\hyperlink{classNavGrid}{NavGrid}}\&,\ \mbox{\hyperlink{classGridDirection}{GridDirection}}\ d)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00126\ \ \ \ \ \textcolor{keywordtype}{void}\ setEdge(\mbox{\hyperlink{classGridDirection}{GridDirection}}\ d,\ \textcolor{keywordtype}{bool}\ mask);}
\DoxyCodeLine{00127\ }
\DoxyCodeLine{00128\ \ \ \ \ \mbox{\hyperlink{classSegment__25}{Segment\_25}}\ getSegmentTo(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&v,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classUniformGrid25}{UniformGrid25}}\ *nav)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classSegment__25}{Segment\_25}}(getRefPoint(nav),\ v.getRefPoint(nav),\ mLayer);\ \}}
\DoxyCodeLine{00129\ }
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structNavKeepoutCounts}{NavKeepoutCounts}}\&\ getKOCounts()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mKOCount;\ \}}
\DoxyCodeLine{00131\ \ \ \ \ \mbox{\hyperlink{structNavKeepoutCounts}{NavKeepoutCounts}}\&\ getKOCounts()\ \{\ \textcolor{keywordflow}{return}\ mKOCount;\ \}}
\DoxyCodeLine{00132\ \ \ \ \ \textcolor{keywordtype}{void}\ resetKO()\ \{\ mKOCount.reset();\ clearFlags(NAV\_POINT\_FLAGS\_CLEARANCE);\ \}}
\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keywordtype}{bool}\ canRoute()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !(mFlags\ \&\ NAV\_POINT\_FLAGS\_TRACKS\_BLOCKED);\ \}}
\DoxyCodeLine{00134\ \ \ \ \ \textcolor{keywordtype}{bool}\ canPlaceVia()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !(mFlags\ \&\ NAV\_POINT\_FLAGS\_VIAS\_BLOCKED);\ \}}
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keywordtype}{bool}\ canPlaceViaEver()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !(mFlags\ \&\ NAV\_POINT\_FLAGS\_VIAS\_BLOCKED\_P);\ \}}
\DoxyCodeLine{00136\ \ \ \ \ \textcolor{keywordtype}{bool}\ canAddVia(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&to)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00137\ \ \ \ \ \textcolor{keywordtype}{bool}\ canAddViaEver(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&to)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordtype}{bool}\ insidePin()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ (mFlags\ \&\ NAV\_POINT\_FLAG\_INSIDE\_PIN);\ \}}
\DoxyCodeLine{00139\ \ \ \ \ \textcolor{keywordtype}{bool}\ hasFlags(uint16\_t\ mask)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ !!(mFlags\ \&\ mask);\ \}}
\DoxyCodeLine{00140\ \ \ \ \ uint16\_t\ getFlags()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mFlags;\ \}}
\DoxyCodeLine{00141\ \ \ \ \ \textcolor{keywordtype}{void}\ setFlags(uint16\_t\ mask)\ \{\ mFlags\ |=\ mask;\ \}}
\DoxyCodeLine{00142\ \ \ \ \ \textcolor{keywordtype}{void}\ clearFlags(uint16\_t\ mask)\ \{\ mFlags\ \&=\ \string~mask;\ \}}
\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keywordtype}{void}\ saveFlags()\ \{\ mFlagsSaved\ =\ mFlags;\ \}}
\DoxyCodeLine{00144\ \ \ \ \ \textcolor{keywordtype}{void}\ restoreFlags()\ \{\ mFlags\ =\ mFlagsSaved;\ \}}
\DoxyCodeLine{00145\ }
\DoxyCodeLine{00146\ \ \ \ \ \textcolor{keywordtype}{void}\ write(\textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\&);}
\DoxyCodeLine{00147\ \ \ \ \ \textcolor{keywordtype}{void}\ copyFrom(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\&);}
\DoxyCodeLine{00148\ }
\DoxyCodeLine{00149\ \ \ \ \ \textcolor{keywordtype}{float}\ getCost(uint\ term)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mCosts[term];\ \}}
\DoxyCodeLine{00150\ \ \ \ \ \textcolor{keywordtype}{void}\ setCost(uint\ term,\ \textcolor{keywordtype}{float}\ cost)\ \{\ mCosts[term]\ =\ cost;\ \}}
\DoxyCodeLine{00151\ \ \ \ \ \textcolor{keywordtype}{float}\ getScore()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mScore;\ \}}
\DoxyCodeLine{00152\ \ \ \ \ \textcolor{keywordtype}{void}\ setScore(\textcolor{keywordtype}{float}\ score)\ \{\ mScore\ =\ score;\ \}}
\DoxyCodeLine{00153\ }
\DoxyCodeLine{00154\ \ \ \ \ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ *getBackEdge(\mbox{\hyperlink{classNavGrid}{NavGrid}}\ \&nav)\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ getEdge(nav,\ mBackDir);\ \}}
\DoxyCodeLine{00155\ \ \ \ \ \mbox{\hyperlink{classGridDirection}{GridDirection}}\ getBackDirection()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mBackDir;\ \}}
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordtype}{void}\ setBackDirection(\mbox{\hyperlink{classGridDirection}{GridDirection}}\ d)\ \{\ mBackDir\ =\ d;\ \}}
\DoxyCodeLine{00157\ }
\DoxyCodeLine{00158\ \ \ \ \ \mbox{\hyperlink{classAStarVisitStatus}{AStarVisitStatus}}\&\ getVisits()\ \{\ \textcolor{keywordflow}{return}\ mVisits;\ \}}
\DoxyCodeLine{00159\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classAStarVisitStatus}{AStarVisitStatus}}\&\ getVisits()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mVisits;\ \}}
\DoxyCodeLine{00160\ }
\DoxyCodeLine{00161\ \ \ \ \ uint16\_t\ getWriteSeq()\textcolor{keyword}{\ const\ }\{\ \textcolor{keywordflow}{return}\ mWriteSeq;\ \}}
\DoxyCodeLine{00162\ \ \ \ \ \textcolor{keywordtype}{void}\ setWriteSeq(uint16\_t\ v)\ \{\ mWriteSeq\ =\ v;\ \}}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00164\ \ \ \ \ std::string\ str(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavGrid}{NavGrid}}\ *)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00165\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00166\ \ \ \ \ int16\_t\ mRefX;}
\DoxyCodeLine{00167\ \ \ \ \ int16\_t\ mRefY;}
\DoxyCodeLine{00168\ \ \ \ \ \textcolor{keywordtype}{float}\ mCosts[GYM\_PCB\_NAVPOINT\_NUM\_COST\_TERMS]\{1.0f\};\ \textcolor{comment}{//\ 16\ +\ \ 8}}
\DoxyCodeLine{00169\ \ \ \ \ \textcolor{keywordtype}{float}\ mScore;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 24\ +\ \ 4}}
\DoxyCodeLine{00170\ \ \ \ \ uint16\_t\ mFlags\{0\};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 28\ +\ \ 2}}
\DoxyCodeLine{00171\ \ \ \ \ uint16\_t\ mFlagsSaved\{0\};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 30\ +\ \ 2}}
\DoxyCodeLine{00172\ \ \ \ \ uint16\_t\ mEdgeMask\{0\};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 32\ +\ \ 2}}
\DoxyCodeLine{00173\ \ \ \ \ uint8\_t\ mLayer;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 34\ +\ \ 1}}
\DoxyCodeLine{00174\ \ \ \ \ \mbox{\hyperlink{classGridDirection}{GridDirection}}\ mBackDir;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 35\ +\ \ 1}}
\DoxyCodeLine{00175\ \ \ \ \ \mbox{\hyperlink{classAStarVisitStatus}{AStarVisitStatus}}\ mVisits;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 36\ +\ \ 2}}
\DoxyCodeLine{00176\ \ \ \ \ \mbox{\hyperlink{structNavKeepoutCounts}{NavKeepoutCounts}}\ mKOCount;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 38\ +\ \ 6}}
\DoxyCodeLine{00177\ \ \ \ \ uint16\_t\ mWriteSeq\{0\};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ 48\ +\ \ 2}}
\DoxyCodeLine{00178\ \ \ \ \ \textcolor{comment}{//\ Align\ for\ sizeof(double)\ \ \ \ \ \ \ \ \ \ \ \ \ //\ 50\ \string~\ 56}}
\DoxyCodeLine{00179\ \};}
\DoxyCodeLine{00180\ }
\DoxyCodeLine{00181\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ NavPoint::canAddVia(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&to)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00182\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordflow}{return}\ canPlaceVia()\ \&\&\ to.canPlaceVia()\ \&\&\ !((mFlags\ \string^\ to.mFlags)\ \&\ NAV\_POINT\_FLAG\_INSIDE\_PIN);}
\DoxyCodeLine{00184\ \}}
\DoxyCodeLine{00185\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{bool}\ NavPoint::canAddViaEver(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&to)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00186\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00187\ \ \ \ \ \textcolor{keywordflow}{return}\ canPlaceViaEver()\ \&\&\ to.canPlaceViaEver()\ \&\&\ !((mFlags\ \string^\ to.mFlags)\ \&\ NAV\_POINT\_FLAG\_INSIDE\_PIN);}
\DoxyCodeLine{00188\ \}}
\DoxyCodeLine{00189\ }
\DoxyCodeLine{00190\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ NavPoint::setEdge(\mbox{\hyperlink{classGridDirection}{GridDirection}}\ d,\ \textcolor{keywordtype}{bool}\ mask)}
\DoxyCodeLine{00191\ \{}
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordflow}{if}\ (mask)}
\DoxyCodeLine{00193\ \ \ \ \ \ \ \ \ mEdgeMask\ |=\ 1\ <<\ d.n();}
\DoxyCodeLine{00194\ \ \ \ \ \textcolor{keywordflow}{else}\ mEdgeMask\ \&=\ \string~(1\ <<\ d.n());}
\DoxyCodeLine{00195\ \}}
\DoxyCodeLine{00196\ }
\DoxyCodeLine{00197\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ NavPoint::copyFrom(\textcolor{keyword}{const}\ \mbox{\hyperlink{classNavPoint}{NavPoint}}\ \&nav)}
\DoxyCodeLine{00198\ \{}
\DoxyCodeLine{00199\ \ \ \ \ assert(mRefX\ ==\ nav.mRefX\ \&\&\ mRefY\ ==\ nav.mRefY\ \&\&\ mLayer\ ==\ nav.mLayer);}
\DoxyCodeLine{00200\ \ \ \ \ \textcolor{keywordflow}{for}\ (uint\ i\ =\ 0;\ i\ <\ GYM\_PCB\_NAVPOINT\_NUM\_COST\_TERMS;\ ++i)}
\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ mCosts[i]\ =\ nav.mCosts[i];}
\DoxyCodeLine{00202\ \ \ \ \ mFlags\ =\ nav.mFlags;}
\DoxyCodeLine{00203\ \ \ \ \ mKOCount\ =\ nav.mKOCount;}
\DoxyCodeLine{00204\ \}}
\DoxyCodeLine{00205\ }
\DoxyCodeLine{00206\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ NavPoint::write(\textcolor{keyword}{const}\ \mbox{\hyperlink{structNavRasterizeParams}{NavRasterizeParams}}\ \&data)}
\DoxyCodeLine{00207\ \{}
\DoxyCodeLine{00208\ \ \ \ \ \textcolor{keywordflow}{if}\ ((mWriteSeq\ ==\ data.\mbox{\hyperlink{structNavRasterizeParams_ae1290fa4bcb3ce4bc0c5b6752dad4b64}{WriteSeq}})\ ||\ (mFlags\ \&\ data.\mbox{\hyperlink{structNavRasterizeParams_a4940df81d2a5d6a4eabf2bf25a1fdc86}{IgnoreMask}}))}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{00210\ \ \ \ \ mWriteSeq\ =\ data.\mbox{\hyperlink{structNavRasterizeParams_ae1290fa4bcb3ce4bc0c5b6752dad4b64}{WriteSeq}};}
\DoxyCodeLine{00211\ \ \ \ \ mFlags\ \&=\ \string~NAV\_POINT\_FLAGS\_CLEARANCE;}
\DoxyCodeLine{00212\ \ \ \ \ \textcolor{keywordflow}{if}\ (mKOCount.\_RouteTracks\ +=\ data.KOCount.\_RouteTracks)\ mFlags\ |=\ NAV\_POINT\_FLAG\_ROUTE\_TRACK\_CLEARANCE;}
\DoxyCodeLine{00213\ \ \ \ \ \textcolor{keywordflow}{if}\ (mKOCount.\_RouteVias\ +=\ data.KOCount.\_RouteVias)\ \ \ \ \ mFlags\ |=\ NAV\_POINT\_FLAG\_ROUTE\_VIA\_CLEARANCE;}
\DoxyCodeLine{00214\ \ \ \ \ \textcolor{keywordflow}{if}\ (mKOCount.\_PinTracks\ +=\ data.KOCount.\_PinTracks)\ \ \ \ \ mFlags\ |=\ NAV\_POINT\_FLAG\_PIN\_TRACK\_CLEARANCE;}
\DoxyCodeLine{00215\ \ \ \ \ \textcolor{keywordflow}{if}\ (mKOCount.\_PinVias\ +=\ data.KOCount.\_PinVias)\ \ \ \ \ \ \ \ \ mFlags\ |=\ NAV\_POINT\_FLAG\_PIN\_VIA\_CLEARANCE;}
\DoxyCodeLine{00216\ \ \ \ \ mFlags\ =\ (mFlags\ \&\ data.\mbox{\hyperlink{structNavRasterizeParams_a256b0a2c1a604811f2c38c2ef1f597b4}{FlagsAnd}})\ |\ data.\mbox{\hyperlink{structNavRasterizeParams_a9d5c0b3ec49d3c7dd55645da5312b382}{FlagsOr}};}
\DoxyCodeLine{00217\ \}}
\DoxyCodeLine{00218\ }
\DoxyCodeLine{00219\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_NAVPOINT\_H}}

\end{DoxyCode}
