\hypertarget{a07800}{}\section{A\+CG\+:\+:Scene\+Graph\+:\+:Glut\+Primitive\+Node Class Reference}
\label{a07800}\index{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}}


{\ttfamily \#include $<$A\+C\+G/\+Scenegraph/\+Glut\+Primitive\+Node.\+hh$>$}

Inheritance diagram for A\+CG\+:\+:Scene\+Graph\+:\+:Glut\+Primitive\+Node\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a07800}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{a07804}{Primitive}
\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07800_a312a59db1d559a4955fd6ee2737850e1}\label{a07800_a312a59db1d559a4955fd6ee2737850e1}} 
enum \hyperlink{a07800_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \{ \newline
{\bfseries C\+O\+NE} =0, 
{\bfseries C\+U\+BE}, 
{\bfseries D\+O\+D\+E\+C\+A\+H\+E\+D\+R\+ON}, 
{\bfseries I\+C\+O\+S\+A\+H\+E\+D\+R\+ON}, 
\newline
{\bfseries O\+C\+T\+A\+H\+E\+D\+R\+ON}, 
{\bfseries S\+P\+H\+E\+RE}, 
{\bfseries T\+E\+T\+R\+A\+H\+E\+D\+R\+ON}, 
{\bfseries T\+O\+R\+US}
 \}\begin{DoxyCompactList}\small\item\em Lists all available primivites. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07800_a84de7b701d7e0782d3abd9146f983d89}\label{a07800_a84de7b701d7e0782d3abd9146f983d89}} 
{\bfseries Glut\+Primitive\+Node} (\hyperlink{a07748}{Base\+Node} $\ast$\+\_\+parent=0, const std\+::string \&\+\_\+name=\char`\"{}$<$Glut\+Primitive$>$\char`\"{})
\item 
\mbox{\Hypertarget{a07800_ab15671524627f1889f59220c243451f1}\label{a07800_ab15671524627f1889f59220c243451f1}} 
{\bfseries Glut\+Primitive\+Node} (\hyperlink{a07800_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \+\_\+type, \hyperlink{a07748}{Base\+Node} $\ast$\+\_\+parent=0, const std\+::string \&\+\_\+name=\char`\"{}$<$Glut\+Primitive$>$\char`\"{})
\item 
\mbox{\Hypertarget{a07800_a125c42df9d6485ff952bd466c4463242}\label{a07800_a125c42df9d6485ff952bd466c4463242}} 
virtual \hyperlink{a07800_a125c42df9d6485ff952bd466c4463242}{$\sim$\+Glut\+Primitive\+Node} ()
\begin{DoxyCompactList}\small\item\em destructor \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{a07800_a93f32169793c818bceb610a1bdb8f21c}{add\+\_\+primitive} (\hyperlink{a07800_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \+\_\+type, \hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \+\_\+pos, \hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \+\_\+axis, \hyperlink{a08448}{A\+C\+G\+::\+Vec4f} \+\_\+color)
\item 
\mbox{\Hypertarget{a07800_adbd4a838e20bd144bbd91ec8de4e1684}\label{a07800_adbd4a838e20bd144bbd91ec8de4e1684}} 
void {\bfseries clear} ()
\item 
\mbox{\Hypertarget{a07800_a21e15b0cfd89aac403bea46d7f51d6f4}\label{a07800_a21e15b0cfd89aac403bea46d7f51d6f4}} 
void \hyperlink{a07800_a21e15b0cfd89aac403bea46d7f51d6f4}{set\+\_\+position} (const \hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+p, int \+\_\+idx=0)
\begin{DoxyCompactList}\small\item\em set position \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_a6b4985f9745a34ca92d20fde316008ab}\label{a07800_a6b4985f9745a34ca92d20fde316008ab}} 
const \hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \hyperlink{a07800_a6b4985f9745a34ca92d20fde316008ab}{get\+\_\+position} (int \+\_\+idx=0) const
\begin{DoxyCompactList}\small\item\em get position \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_afb7a5585e2dbcc34a108d38f142e2443}\label{a07800_afb7a5585e2dbcc34a108d38f142e2443}} 
\hyperlink{a07804}{Primitive} \& \hyperlink{a07800_afb7a5585e2dbcc34a108d38f142e2443}{get\+\_\+primitive} (int \+\_\+idx)
\begin{DoxyCompactList}\small\item\em get a primitive \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_ac6bcb1d4c6d6d605559cff19b800f550}\label{a07800_ac6bcb1d4c6d6d605559cff19b800f550}} 
void \hyperlink{a07800_ac6bcb1d4c6d6d605559cff19b800f550}{set\+\_\+size} (double \+\_\+s, int \+\_\+idx=0)
\begin{DoxyCompactList}\small\item\em set size \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_ac18cdb7061130660a28303984feeef28}\label{a07800_ac18cdb7061130660a28303984feeef28}} 
double \hyperlink{a07800_ac18cdb7061130660a28303984feeef28}{get\+\_\+size} (int \+\_\+idx=0) const
\begin{DoxyCompactList}\small\item\em get size \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_ad24f2cf60d14d5b5bd5f8dc2519d6a23}\label{a07800_ad24f2cf60d14d5b5bd5f8dc2519d6a23}} 
{\bfseries A\+C\+G\+\_\+\+C\+L\+A\+S\+S\+N\+A\+ME} (\hyperlink{a07800}{Glut\+Primitive\+Node})
\item 
\mbox{\Hypertarget{a07800_a0066778c9284f21ae7dec0dd47ac18b3}\label{a07800_a0066778c9284f21ae7dec0dd47ac18b3}} 
\hyperlink{a07792}{Draw\+Modes\+::\+Draw\+Mode} \hyperlink{a07800_a0066778c9284f21ae7dec0dd47ac18b3}{available\+Draw\+Modes} () const
\begin{DoxyCompactList}\small\item\em return available draw modes \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_ae0e5754e3f154385e85e04f82f210184}\label{a07800_ae0e5754e3f154385e85e04f82f210184}} 
void \hyperlink{a07800_ae0e5754e3f154385e85e04f82f210184}{bounding\+Box} (\hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+bb\+Min, \hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+bb\+Max)
\begin{DoxyCompactList}\small\item\em update bounding box \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_a044c624dbbe441d8cd255828db209999}\label{a07800_a044c624dbbe441d8cd255828db209999}} 
void \hyperlink{a07800_a044c624dbbe441d8cd255828db209999}{draw} (\hyperlink{a07452}{G\+L\+State} \&\+\_\+state, const \hyperlink{a07792}{Draw\+Modes\+::\+Draw\+Mode} \&\+\_\+draw\+Mode)
\begin{DoxyCompactList}\small\item\em drawing the primitive \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07800_a37e8b03342487ebaae6fbc5d3770ac2b}\label{a07800_a37e8b03342487ebaae6fbc5d3770ac2b}} 
void {\bfseries draw\+\_\+obj} (\hyperlink{a07452}{G\+L\+State} \&\+\_\+state, size\+\_\+t \+\_\+idx) const
\item 
\mbox{\Hypertarget{a07800_aee272419e842d634fbac05a5543e8b8d}\label{a07800_aee272419e842d634fbac05a5543e8b8d}} 
void \hyperlink{a07800_aee272419e842d634fbac05a5543e8b8d}{pick} (\hyperlink{a07452}{G\+L\+State} \&\+\_\+state, \hyperlink{a06177_af5fad41dadeca314c2077f897377dbd0}{Pick\+Target} \+\_\+target)
\begin{DoxyCompactList}\small\item\em picking \end{DoxyCompactList}\item 
void \hyperlink{a07800_ac42f9712fa092f484f2d404ba6acaf3e}{set\+Color\+Internal} (bool \+\_\+set)
\begin{DoxyCompactList}\small\item\em Disable internal color processing. \end{DoxyCompactList}\item 
void \hyperlink{a07800_a2fd23c6b7d191f4d82b56fb42acf4bbc}{get\+Render\+Objects} (\hyperlink{a07468}{I\+Renderer} $\ast$\+\_\+renderer, \hyperlink{a07452}{G\+L\+State} \&\+\_\+state, const \hyperlink{a07792}{Draw\+Modes\+::\+Draw\+Mode} \&\+\_\+draw\+Mode, const \hyperlink{a07828}{Material} $\ast$\+\_\+mat)
\begin{DoxyCompactList}\small\item\em Add the objects to the given renderer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07800_a52c38485a9bfcb40d9abd8285ec31b76}\label{a07800_a52c38485a9bfcb40d9abd8285ec31b76}} 
std\+::vector$<$ \hyperlink{a07804}{Primitive} $>$ {\bfseries primitives\+\_\+}
\item 
\mbox{\Hypertarget{a07800_a4073d5a69ed52c26bfba0972cba716f9}\label{a07800_a4073d5a69ed52c26bfba0972cba716f9}} 
bool {\bfseries set\+Color\+\_\+}
\item 
\mbox{\Hypertarget{a07800_abb1ec90955c674e8e8b20819876f1d25}\label{a07800_abb1ec90955c674e8e8b20819876f1d25}} 
\hyperlink{a07392}{A\+C\+G\+::\+G\+L\+Sphere} $\ast$ {\bfseries sphere\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class is able to render all glut primitives (listed in Glut\+Primitive\+Type). 

Definition at line 82 of file Glut\+Primitive\+Node.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07800_a93f32169793c818bceb610a1bdb8f21c}\label{a07800_a93f32169793c818bceb610a1bdb8f21c}} 
\index{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}!add\+\_\+primitive@{add\+\_\+primitive}}
\index{add\+\_\+primitive@{add\+\_\+primitive}!A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}}
\subsubsection{\texorpdfstring{add\+\_\+primitive()}{add\_primitive()}}
{\footnotesize\ttfamily size\+\_\+t A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::add\+\_\+primitive (\begin{DoxyParamCaption}\item[{\hyperlink{a07800_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type}}]{\+\_\+type,  }\item[{\hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d}}]{\+\_\+pos,  }\item[{\hyperlink{a06176_ae4a56bb6b65d7f966934982a1e370213}{Vec3d}}]{\+\_\+axis,  }\item[{\hyperlink{a08448}{A\+C\+G\+::\+Vec4f}}]{\+\_\+color }\end{DoxyParamCaption})}

Adds a primitive and returns its index.

\begin{DoxyReturn}{Returns}
the index of the new primitive. 
\end{DoxyReturn}


Definition at line 295 of file Glut\+Primitive\+Node.\+cc.

\mbox{\Hypertarget{a07800_a2fd23c6b7d191f4d82b56fb42acf4bbc}\label{a07800_a2fd23c6b7d191f4d82b56fb42acf4bbc}} 
\index{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}!get\+Render\+Objects@{get\+Render\+Objects}}
\index{get\+Render\+Objects@{get\+Render\+Objects}!A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}}
\subsubsection{\texorpdfstring{get\+Render\+Objects()}{getRenderObjects()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::get\+Render\+Objects (\begin{DoxyParamCaption}\item[{\hyperlink{a07468}{I\+Renderer} $\ast$}]{\+\_\+renderer,  }\item[{\hyperlink{a07452}{G\+L\+State} \&}]{\+\_\+state,  }\item[{const \hyperlink{a07792}{Draw\+Modes\+::\+Draw\+Mode} \&}]{\+\_\+draw\+Mode,  }\item[{const \hyperlink{a07828}{Material} $\ast$}]{\+\_\+mat }\end{DoxyParamCaption})}



Add the objects to the given renderer. 


\begin{DoxyParams}{Parameters}
{\em \+\_\+renderer} & The renderer which will be used. Add your geometry into this class \\
\hline
{\em \+\_\+state} & The current GL State when this object is called \\
\hline
{\em \+\_\+draw\+Mode} & The active draw mode \\
\hline
{\em \+\_\+mat} & Current material \\
\hline
\end{DoxyParams}


Definition at line 413 of file Glut\+Primitive\+Node.\+cc.

\mbox{\Hypertarget{a07800_ac42f9712fa092f484f2d404ba6acaf3e}\label{a07800_ac42f9712fa092f484f2d404ba6acaf3e}} 
\index{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}!set\+Color\+Internal@{set\+Color\+Internal}}
\index{set\+Color\+Internal@{set\+Color\+Internal}!A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node@{A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node}}
\subsubsection{\texorpdfstring{set\+Color\+Internal()}{setColorInternal()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::set\+Color\+Internal (\begin{DoxyParamCaption}\item[{bool}]{\+\_\+set }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Disable internal color processing. 

Disables the internal color processing of the primitives. If disabled, a Materialnodes settings will apply here. 

Definition at line 225 of file Glut\+Primitive\+Node.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Scenegraph/Glut\+Primitive\+Node.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Scenegraph/Glut\+Primitive\+Node.\+cc\end{DoxyCompactItemize}
