\section{lib/pathplan/route.c File Reference}
\label{route_8c}\index{lib/pathplan/route.\-c@{lib/pathplan/route.\-c}}
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
{\ttfamily \#include $<$stdio.\-h$>$}\\*
{\ttfamily \#include $<$setjmp.\-h$>$}\\*
{\ttfamily \#include $<$math.\-h$>$}\\*
{\ttfamily \#include \char`\"{}pathutil.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}solvers.\-h\char`\"{}}\\*
Include dependency graph for route.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{route_8c__incl}
\end{center}
\end{figure}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct {\bf tna\-\_\-t}
\item 
struct {\bf p2e\-\_\-t}
\item 
struct {\bf elist\-\_\-t}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define {\bf E\-P\-S\-I\-L\-O\-N1}~1\-E-\/3
\item 
\#define {\bf E\-P\-S\-I\-L\-O\-N2}~1\-E-\/6
\item 
\#define {\bf A\-B\-S}(a)~((a) $>$= 0 ? (a) \-: -\/(a))
\item 
\#define {\bf prerror}(msg)~fprintf (stderr, \char`\"{}libpath/\%s\-:\%d\-: \%{\bf s\textbackslash{}n}\char`\"{}, \-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-, (msg))
\item 
\#define {\bf D\-I\-S\-T\-S\-Q}(a, b)
\item 
\#define {\bf P\-O\-I\-N\-T\-S\-I\-Z\-E}~sizeof ({\bf Ppoint\-\_\-t})
\item 
\#define {\bf L\-T}(pa, pbp)~((pa.\-y $>$ pbp-\/$>$y) $|$$|$ ((pa.\-y == pbp-\/$>$y) \&\& (pa.\-x $<$ pbp-\/$>$x)))
\item 
\#define {\bf G\-T}(pa, pbp)~((pa.\-y $<$ pbp-\/$>$y) $|$$|$ ((pa.\-y == pbp-\/$>$y) \&\& (pa.\-x $>$ pbp-\/$>$x)))
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct {\bf tna\-\_\-t} {\bf tna\-\_\-t}
\item 
typedef struct {\bf p2e\-\_\-t} {\bf p2e\-\_\-t}
\item 
typedef struct {\bf elist\-\_\-t} {\bf elist\-\_\-t}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\bf int} {\bf Proutespline} ({\bf Pedge\-\_\-t} $\ast$edges, {\bf int} edgen, {\bf Ppolyline\-\_\-t} input, {\bf Ppoint\-\_\-t} $\ast$evs, {\bf Ppolyline\-\_\-t} $\ast$output)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\index{route.\-c@{route.\-c}!A\-B\-S@{A\-B\-S}}
\index{A\-B\-S@{A\-B\-S}!route.c@{route.\-c}}
\subsubsection[{A\-B\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define A\-B\-S(
\begin{DoxyParamCaption}
\item[{}]{a}
\end{DoxyParamCaption}
)~((a) $>$= 0 ? (a) \-: -\/(a))}\label{route_8c_ae2f08dc603ae93c402abd918ba4e23e1}


Definition at line 32 of file route.\-c.

\index{route.\-c@{route.\-c}!D\-I\-S\-T\-S\-Q@{D\-I\-S\-T\-S\-Q}}
\index{D\-I\-S\-T\-S\-Q@{D\-I\-S\-T\-S\-Q}!route.c@{route.\-c}}
\subsubsection[{D\-I\-S\-T\-S\-Q}]{\setlength{\rightskip}{0pt plus 5cm}\#define D\-I\-S\-T\-S\-Q(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)}\label{route_8c_a1ef8a3a51c1e57293c07c2e72a59d51e}
{\bfseries Value\-:}
\begin{DoxyCode}
( \(\backslash\)
    (((a).x - (b).x) * ((a).x - (b).x)) + (((a).y - (b).y) * ((a).y - (b).y)) \(\backslash\)
)
\end{DoxyCode}


Definition at line 42 of file route.\-c.

\index{route.\-c@{route.\-c}!E\-P\-S\-I\-L\-O\-N1@{E\-P\-S\-I\-L\-O\-N1}}
\index{E\-P\-S\-I\-L\-O\-N1@{E\-P\-S\-I\-L\-O\-N1}!route.c@{route.\-c}}
\subsubsection[{E\-P\-S\-I\-L\-O\-N1}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\-P\-S\-I\-L\-O\-N1~1\-E-\/3}\label{route_8c_ab8052b5eb2dc9aca33abd0ff01c4768f}


Definition at line 29 of file route.\-c.

\index{route.\-c@{route.\-c}!E\-P\-S\-I\-L\-O\-N2@{E\-P\-S\-I\-L\-O\-N2}}
\index{E\-P\-S\-I\-L\-O\-N2@{E\-P\-S\-I\-L\-O\-N2}!route.c@{route.\-c}}
\subsubsection[{E\-P\-S\-I\-L\-O\-N2}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\-P\-S\-I\-L\-O\-N2~1\-E-\/6}\label{route_8c_a033854bd129112ec61a4abdf9c31894e}


Definition at line 30 of file route.\-c.

\index{route.\-c@{route.\-c}!G\-T@{G\-T}}
\index{G\-T@{G\-T}!route.c@{route.\-c}}
\subsubsection[{G\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define G\-T(
\begin{DoxyParamCaption}
\item[{}]{pa, }
\item[{}]{pbp}
\end{DoxyParamCaption}
)~((pa.\-y $<$ pbp-\/$>$y) $|$$|$ ((pa.\-y == pbp-\/$>$y) \&\& (pa.\-x $>$ pbp-\/$>$x)))}\label{route_8c_a07fed269e14b8741a2538a11474f4cd3}


Definition at line 49 of file route.\-c.



Referenced by Proutespline().

\index{route.\-c@{route.\-c}!L\-T@{L\-T}}
\index{L\-T@{L\-T}!route.c@{route.\-c}}
\subsubsection[{L\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define L\-T(
\begin{DoxyParamCaption}
\item[{}]{pa, }
\item[{}]{pbp}
\end{DoxyParamCaption}
)~((pa.\-y $>$ pbp-\/$>$y) $|$$|$ ((pa.\-y == pbp-\/$>$y) \&\& (pa.\-x $<$ pbp-\/$>$x)))}\label{route_8c_ad7e2a5b4c083e05ab596e841d8243e3b}


Definition at line 48 of file route.\-c.



Referenced by Proutespline().

\index{route.\-c@{route.\-c}!P\-O\-I\-N\-T\-S\-I\-Z\-E@{P\-O\-I\-N\-T\-S\-I\-Z\-E}}
\index{P\-O\-I\-N\-T\-S\-I\-Z\-E@{P\-O\-I\-N\-T\-S\-I\-Z\-E}!route.c@{route.\-c}}
\subsubsection[{P\-O\-I\-N\-T\-S\-I\-Z\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define P\-O\-I\-N\-T\-S\-I\-Z\-E~sizeof ({\bf Ppoint\-\_\-t})}\label{route_8c_a12c252290763ee0b2cbb540cee43fddb}


Definition at line 46 of file route.\-c.

\index{route.\-c@{route.\-c}!prerror@{prerror}}
\index{prerror@{prerror}!route.c@{route.\-c}}
\subsubsection[{prerror}]{\setlength{\rightskip}{0pt plus 5cm}\#define prerror(
\begin{DoxyParamCaption}
\item[{}]{msg}
\end{DoxyParamCaption}
)~fprintf (stderr, \char`\"{}libpath/\%s\-:\%d\-: \%{\bf s\textbackslash{}n}\char`\"{}, \-\_\-\-\_\-\-F\-I\-L\-E\-\_\-\-\_\-, \-\_\-\-\_\-\-L\-I\-N\-E\-\_\-\-\_\-, (msg))}\label{route_8c_a9afd5771015320f2b7478ebcf9c7bf1d}


Definition at line 39 of file route.\-c.



Referenced by Proutespline().



\subsection{Typedef Documentation}
\index{route.\-c@{route.\-c}!elist\-\_\-t@{elist\-\_\-t}}
\index{elist\-\_\-t@{elist\-\_\-t}!route.c@{route.\-c}}
\subsubsection[{elist\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf elist\-\_\-t}  {\bf elist\-\_\-t}}\label{route_8c_aadc465fff094c58eaa103057ac4193dd}
\index{route.\-c@{route.\-c}!p2e\-\_\-t@{p2e\-\_\-t}}
\index{p2e\-\_\-t@{p2e\-\_\-t}!route.c@{route.\-c}}
\subsubsection[{p2e\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf p2e\-\_\-t}  {\bf p2e\-\_\-t}}\label{route_8c_a8042ef7129fb8ef7d6a47f1f7e4fefbf}
\index{route.\-c@{route.\-c}!tna\-\_\-t@{tna\-\_\-t}}
\index{tna\-\_\-t@{tna\-\_\-t}!route.c@{route.\-c}}
\subsubsection[{tna\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf tna\-\_\-t}  {\bf tna\-\_\-t}}\label{route_8c_ab3ca474386f357cfe58d503924dc2217}


\subsection{Function Documentation}
\index{route.\-c@{route.\-c}!Proutespline@{Proutespline}}
\index{Proutespline@{Proutespline}!route.c@{route.\-c}}
\subsubsection[{Proutespline}]{\setlength{\rightskip}{0pt plus 5cm}{\bf int} Proutespline (
\begin{DoxyParamCaption}
\item[{{\bf Pedge\-\_\-t} $\ast$}]{edges, }
\item[{{\bf int}}]{edgen, }
\item[{{\bf Ppolyline\-\_\-t}}]{input, }
\item[{{\bf Ppoint\-\_\-t} $\ast$}]{evs, }
\item[{{\bf Ppolyline\-\_\-t} $\ast$}]{output}
\end{DoxyParamCaption}
)}\label{route_8c_a72394317245adf33d21a6f0172a7d9da}


Definition at line 115 of file route.\-c.



References Pedge\-\_\-t\-::a, Pedge\-\_\-t\-::b, p2e\-\_\-t\-::ep, G\-T, L\-T, N\-U\-L\-L, Ppoly\-\_\-t\-::pn, p2e\-\_\-t\-::pp, prerror, Ppoly\-\_\-t\-::ps, Pxy\-\_\-t\-::x, and Pxy\-\_\-t\-::y.

