\doxysection{PCBoard\+Mesh.\+hpp}
\hypertarget{PCBoardMesh_8hpp_source}{}\label{PCBoardMesh_8hpp_source}\index{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/PCBoardMesh.hpp@{/home/chr/devel/PhD/Environment/pub/PCBEnv/pcbenv/cxx/UI/PCBoardMesh.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#ifndef\ GYM\_PCB\_UI\_PCBOARDMESH\_H}}
\DoxyCodeLine{00003\ \textcolor{preprocessor}{\#define\ GYM\_PCB\_UI\_PCBOARDMESH\_H}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <map>}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#include\ <set>}}
\DoxyCodeLine{00007\ \textcolor{preprocessor}{\#include\ "{}GLContext.hpp"{}}}
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classAShape}{AShape}};}
\DoxyCodeLine{00010\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classPCBoard}{PCBoard}};}
\DoxyCodeLine{00011\ \textcolor{keyword}{class\ }\mbox{\hyperlink{classCamera}{Camera}};}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{class\ }PCBoardMesh}
\DoxyCodeLine{00014\ \{}
\DoxyCodeLine{00015\ \ \ \ \ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{static}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ AlwaysDrawComponentsAsBoxes\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{00016\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00017\ \ \ \ \ PCBoardMesh(\textcolor{keyword}{const}\ \mbox{\hyperlink{classPCBoard}{PCBoard}}\&,\ \textcolor{keywordtype}{int}\ z,\ \textcolor{keywordtype}{char}\ mask\ =\ RENDER\_MASK\_ALL);}
\DoxyCodeLine{00018\ \ \ \ \ \string~PCBoardMesh();}
\DoxyCodeLine{00019\ }
\DoxyCodeLine{00020\ \ \ \ \ \textcolor{keywordtype}{void}\ update();}
\DoxyCodeLine{00021\ \ \ \ \ \textcolor{keywordtype}{void}\ draw(\textcolor{keyword}{const}\ \mbox{\hyperlink{classCamera}{Camera}}\&);}
\DoxyCodeLine{00022\ \ \ \ \ \textcolor{keywordtype}{void}\ drawExtra();}
\DoxyCodeLine{00023\ \ \ \ \ \textcolor{keywordtype}{void}\ setCamera(\textcolor{keyword}{const}\ \mbox{\hyperlink{classCamera}{Camera}}\&);}
\DoxyCodeLine{00024\ \ \ \ \ \textcolor{keywordtype}{void}\ setExtraSet(\textcolor{keyword}{const}\ std::set<Object\ *>\ *);}
\DoxyCodeLine{00025\ \ \ \ \ \textcolor{keywordtype}{void}\ setLineWidth(\textcolor{keywordtype}{float}\ w)\ \{\ mLineWidthBase\ =\ w;\ \}}
\DoxyCodeLine{00026\ \ \ \ \ \textcolor{keywordtype}{void}\ setLineAlpha(\textcolor{keywordtype}{float}\ a)\ \{\ mLineAlpha\ =\ a;\ \}}
\DoxyCodeLine{00027\ \ \ \ \ \textcolor{keywordtype}{void}\ setFillAlpha(\textcolor{keywordtype}{float}\ a)\ \{\ mFillAlpha\ =\ a;\ \}}
\DoxyCodeLine{00028\ }
\DoxyCodeLine{00029\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{const}\ GLushort\ RestartIndex\ =\ 0xffff;}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ RENDER\_MASK\_COMPONENTS\ =\ 0x1;}
\DoxyCodeLine{00032\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ RENDER\_MASK\_PINS\ \ \ \ \ \ \ =\ 0x2;}
\DoxyCodeLine{00033\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keyword}{constexpr}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ RENDER\_MASK\_ALL\ \ \ \ \ \ \ \ =\ 0x3;}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structPCBoardMesh_1_1IndexRange}{IndexRange}}\ \{}
\DoxyCodeLine{00036\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{\ uint16\_t\ Line\{0\},\ Fan\{0\},\ Quad\{0\};\ \}\ Start,\ End;}
\DoxyCodeLine{00037\ \ \ \ \ \};}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{classPCBoard}{PCBoard}}\ \&mBoard;}
\DoxyCodeLine{00041\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{int}\ mZ;}
\DoxyCodeLine{00042\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ mMask;}
\DoxyCodeLine{00043\ \ \ \ \ \textcolor{keyword}{const}\ std::set<Object\ *>\ *mExtraSet\{0\};}
\DoxyCodeLine{00044\ }
\DoxyCodeLine{00045\ \ \ \ \ GLuint\ mVBO[2]\{0\};\ \textcolor{comment}{//\ Fans/Lines,\ Circles.}}
\DoxyCodeLine{00046\ \ \ \ \ GLuint\ mIBO[2]\{0,0\};\ \textcolor{comment}{//\ Fans,\ Lines.}}
\DoxyCodeLine{00047\ \ \ \ \ GLuint\ mVAO[3]\{0,0\};\ \textcolor{comment}{//\ Fans,\ Lines,\ Circles.}}
\DoxyCodeLine{00048\ \ \ \ \ GLsizei\ mIndexCountL\{0\};}
\DoxyCodeLine{00049\ \ \ \ \ GLsizei\ mIndexCountT\{0\};}
\DoxyCodeLine{00050\ \ \ \ \ GLsizei\ mRoundVertexCount\{0\};}
\DoxyCodeLine{00051\ \ \ \ \ GLfloat\ mLineWidth\{4.0f\};}
\DoxyCodeLine{00052\ \ \ \ \ GLfloat\ mLineWidthBase\{4.0f\};}
\DoxyCodeLine{00053\ \ \ \ \ GLfloat\ mLineAlpha\{1.0f\};}
\DoxyCodeLine{00054\ \ \ \ \ GLfloat\ mFillAlpha\{1.0f\};}
\DoxyCodeLine{00055\ \ \ \ \ std::map<Object\ *,\ IndexRange>\ mIndexRanges;}
\DoxyCodeLine{00056\ \ \ \ \ std::vector<GLsizei>\ mExtraCount;}
\DoxyCodeLine{00057\ \ \ \ \ std::vector<GLsizei>\ mExtraCountRound;}
\DoxyCodeLine{00058\ \ \ \ \ std::vector<void\ *>\ mExtraStart;}
\DoxyCodeLine{00059\ \ \ \ \ std::vector<GLint>\ mExtraStartRound;}
\DoxyCodeLine{00060\ }
\DoxyCodeLine{00061\ \ \ \ \ \textcolor{keywordtype}{void}\ updateExtra();}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{void}\ countVerticesAndIndices(GLsizei\ \&numVerts,\ GLsizei\ \&numRoundVerts,\ GLsizei\ \&numIndsL,\ GLsizei\ \&numIndsT)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00063\ \ \ \ \ \textcolor{keywordtype}{void}\ countVerticesAndIndices(GLsizei\ \&numVerts,\ GLsizei\ \&numRoundVerts,\ GLsizei\ \&numIndsL,\ GLsizei\ \&numIndsT,\ \textcolor{keyword}{const}\ AShape\ *)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00064\ }
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keywordtype}{void}\ *indexAddress(uint16\_t)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00066\ }
\DoxyCodeLine{00067\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{void}\ init();}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{static}\ GLuint\ sVP,\ sRoundVP,\ sExtraVP;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{static}\ GLuint\ sFP,\ sRoundFP,\ sExtraFP;}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{static}\ GLuint\ sPP,\ sRoundPP,\ sExtraPP;}
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{static}\ GLint\ sUniformRoundAlpha;}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keyword}{static}\ GLint\ sUniformFillAlpha;}
\DoxyCodeLine{00074\ \};}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ GYM\_PCB\_UI\_PCBOARDMESH\_H}}

\end{DoxyCode}
