73 lines
3.8 KiB
TeX
73 lines
3.8 KiB
TeX
\hypertarget{utils_8cpp}{}\doxysection{src/utils.cpp File Reference}
|
|
\label{utils_8cpp}\index{src/utils.cpp@{src/utils.cpp}}
|
|
{\ttfamily \#include \char`\"{}utils.\+h\char`\"{}}\newline
|
|
Include dependency graph for utils.\+cpp\+:
|
|
\nopagebreak
|
|
\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[width=276pt]{d5/d93/utils_8cpp__incl}
|
|
\end{center}
|
|
\end{figure}
|
|
\doxysubsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
bool \mbox{\hyperlink{utils_8cpp_a8d01e61a45fe7072e45f22044013e358}{are\+Lines\+Colliding}} (unsigned start1, unsigned end1, unsigned start2, unsigned end2)
|
|
\begin{DoxyCompactList}\small\item\em tells if 2 lines are colliding in a 1 dimensional space. Didn\textquotesingle{}t want to use Position because of the semantic with x and y \end{DoxyCompactList}\item
|
|
void \mbox{\hyperlink{utils_8cpp_a984f84273044b866085f08117f942b8f}{apply\+Transformation}} (\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} \&pos, unsigned size\+From, unsigned size\+To)
|
|
\begin{DoxyCompactList}\small\item\em change the position object to reflect the top-\/right position of a \char`\"{}size\+To\char`\"{}-\/sized entity, from a \char`\"{}size\+From\char`\"{}-\/sized entity, keeping the same center \end{DoxyCompactList}\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{Function Documentation}
|
|
\mbox{\Hypertarget{utils_8cpp_a984f84273044b866085f08117f942b8f}\label{utils_8cpp_a984f84273044b866085f08117f942b8f}}
|
|
\index{utils.cpp@{utils.cpp}!applyTransformation@{applyTransformation}}
|
|
\index{applyTransformation@{applyTransformation}!utils.cpp@{utils.cpp}}
|
|
\doxysubsubsection{\texorpdfstring{applyTransformation()}{applyTransformation()}}
|
|
{\footnotesize\ttfamily void apply\+Transformation (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{utils_8h_aaa06d516441b519f8892f37adafeade2}{Position}} \&}]{pos, }\item[{unsigned}]{size\+From, }\item[{unsigned}]{size\+To }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
change the position object to reflect the top-\/right position of a \char`\"{}size\+To\char`\"{}-\/sized entity, from a \char`\"{}size\+From\char`\"{}-\/sized entity, keeping the same center
|
|
|
|
|
|
\begin{DoxyParams}[1]{Parameters}
|
|
\mbox{\texttt{ in,out}} & {\em pos} & \+: Position object \\
|
|
\hline
|
|
\mbox{\texttt{ in}} & {\em size\+From} & current size of the objet \\
|
|
\hline
|
|
\mbox{\texttt{ in}} & {\em size\+To} & \+: new size of the object \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
|
|
|
|
Definition at line \mbox{\hyperlink{utils_8cpp_source_l00008}{8}} of file \mbox{\hyperlink{utils_8cpp_source}{utils.\+cpp}}.
|
|
|
|
\mbox{\Hypertarget{utils_8cpp_a8d01e61a45fe7072e45f22044013e358}\label{utils_8cpp_a8d01e61a45fe7072e45f22044013e358}}
|
|
\index{utils.cpp@{utils.cpp}!areLinesColliding@{areLinesColliding}}
|
|
\index{areLinesColliding@{areLinesColliding}!utils.cpp@{utils.cpp}}
|
|
\doxysubsubsection{\texorpdfstring{areLinesColliding()}{areLinesColliding()}}
|
|
{\footnotesize\ttfamily bool are\+Lines\+Colliding (\begin{DoxyParamCaption}\item[{unsigned}]{start1, }\item[{unsigned}]{end1, }\item[{unsigned}]{start2, }\item[{unsigned}]{end2 }\end{DoxyParamCaption})}
|
|
|
|
|
|
|
|
tells if 2 lines are colliding in a 1 dimensional space. Didn\textquotesingle{}t want to use Position because of the semantic with x and y
|
|
|
|
|
|
\begin{DoxyParams}[1]{Parameters}
|
|
\mbox{\texttt{ in}} & {\em start1} & \+: position of the first point of the first line \\
|
|
\hline
|
|
\mbox{\texttt{ in}} & {\em end1} & position of the last point of the first line \\
|
|
\hline
|
|
\mbox{\texttt{ in}} & {\em start2} & \+: position of the first point of the seconde line \\
|
|
\hline
|
|
\mbox{\texttt{ in}} & {\em end2} & position of the last point of the second line \\
|
|
\hline
|
|
\end{DoxyParams}
|
|
\begin{DoxyReturn}{Returns}
|
|
true if they are colliding, false otherwise
|
|
\end{DoxyReturn}
|
|
|
|
|
|
Definition at line \mbox{\hyperlink{utils_8cpp_source_l00003}{3}} of file \mbox{\hyperlink{utils_8cpp_source}{utils.\+cpp}}.
|
|
|