\hypertarget{a00648}{\section{A\+C\+G\+:\+:Scene\+Graph\+:\+:Glut\+Primitive\+Node Class Reference}
\label{a00648}\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\+C\+G\+:\+:Scene\+Graph\+:\+:Glut\+Primitive\+Node\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{a00648}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{a01012}{Primitive}
\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00648_a312a59db1d559a4955fd6ee2737850e1}{enum \hyperlink{a00648_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \{ \\*
{\bfseries C\+O\+N\+E} =0, 
{\bfseries C\+U\+B\+E}, 
{\bfseries D\+O\+D\+E\+C\+A\+H\+E\+D\+R\+O\+N}, 
{\bfseries I\+C\+O\+S\+A\+H\+E\+D\+R\+O\+N}, 
\\*
{\bfseries O\+C\+T\+A\+H\+E\+D\+R\+O\+N}, 
{\bfseries S\+P\+H\+E\+R\+E}, 
{\bfseries T\+E\+A\+P\+O\+T}, 
{\bfseries T\+E\+T\+R\+A\+H\+E\+D\+R\+O\+N}, 
\\*
{\bfseries T\+O\+R\+U\+S}
 \}}\label{a00648_a312a59db1d559a4955fd6ee2737850e1}

\begin{DoxyCompactList}\small\item\em Lists all available primivites. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a00648_a76fa7744d8cfea97fc8f70aef06ab1cd}{{\bfseries Glut\+Primitive\+Node} (\hyperlink{a00327}{Base\+Node} $\ast$\+\_\+parent=0, std\+::string \+\_\+name=\char`\"{}$<$Glut\+Primitive$>$\char`\"{})}\label{a00648_a76fa7744d8cfea97fc8f70aef06ab1cd}

\item 
\hypertarget{a00648_a8172407fad9623f62af30c06a24ed1a7}{{\bfseries Glut\+Primitive\+Node} (\hyperlink{a00648_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \+\_\+type, \hyperlink{a00327}{Base\+Node} $\ast$\+\_\+parent=0, std\+::string \+\_\+name=\char`\"{}$<$Glut\+Primitive$>$\char`\"{})}\label{a00648_a8172407fad9623f62af30c06a24ed1a7}

\item 
\hypertarget{a00648_a125c42df9d6485ff952bd466c4463242}{virtual \hyperlink{a00648_a125c42df9d6485ff952bd466c4463242}{$\sim$\+Glut\+Primitive\+Node} ()}\label{a00648_a125c42df9d6485ff952bd466c4463242}

\begin{DoxyCompactList}\small\item\em destructor \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{a00648_a93f32169793c818bceb610a1bdb8f21c}{add\+\_\+primitive} (\hyperlink{a00648_a312a59db1d559a4955fd6ee2737850e1}{Glut\+Primitive\+Type} \+\_\+type, \hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \+\_\+pos, \hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \+\_\+axis, \hyperlink{a01409}{A\+C\+G\+::\+Vec4f} \+\_\+color)
\item 
\hypertarget{a00648_adbd4a838e20bd144bbd91ec8de4e1684}{void {\bfseries clear} ()}\label{a00648_adbd4a838e20bd144bbd91ec8de4e1684}

\item 
\hypertarget{a00648_a21e15b0cfd89aac403bea46d7f51d6f4}{void \hyperlink{a00648_a21e15b0cfd89aac403bea46d7f51d6f4}{set\+\_\+position} (const \hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+p, int \+\_\+idx=0)}\label{a00648_a21e15b0cfd89aac403bea46d7f51d6f4}

\begin{DoxyCompactList}\small\item\em set position \end{DoxyCompactList}\item 
\hypertarget{a00648_af144344cbef87c1f744bf7fefcfb46a6}{const \hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \hyperlink{a00648_af144344cbef87c1f744bf7fefcfb46a6}{get\+\_\+position} (int \+\_\+idx=0) const }\label{a00648_af144344cbef87c1f744bf7fefcfb46a6}

\begin{DoxyCompactList}\small\item\em get position \end{DoxyCompactList}\item 
\hypertarget{a00648_afb7a5585e2dbcc34a108d38f142e2443}{\hyperlink{a01012}{Primitive} \& \hyperlink{a00648_afb7a5585e2dbcc34a108d38f142e2443}{get\+\_\+primitive} (int \+\_\+idx)}\label{a00648_afb7a5585e2dbcc34a108d38f142e2443}

\begin{DoxyCompactList}\small\item\em get a primitive \end{DoxyCompactList}\item 
\hypertarget{a00648_ac6bcb1d4c6d6d605559cff19b800f550}{void \hyperlink{a00648_ac6bcb1d4c6d6d605559cff19b800f550}{set\+\_\+size} (double \+\_\+s, int \+\_\+idx=0)}\label{a00648_ac6bcb1d4c6d6d605559cff19b800f550}

\begin{DoxyCompactList}\small\item\em set size \end{DoxyCompactList}\item 
\hypertarget{a00648_af3bb60b8fad6e6151459ed8d8ffe479d}{double \hyperlink{a00648_af3bb60b8fad6e6151459ed8d8ffe479d}{get\+\_\+size} (int \+\_\+idx=0) const }\label{a00648_af3bb60b8fad6e6151459ed8d8ffe479d}

\begin{DoxyCompactList}\small\item\em get size \end{DoxyCompactList}\item 
\hypertarget{a00648_ad24f2cf60d14d5b5bd5f8dc2519d6a23}{{\bfseries A\+C\+G\+\_\+\+C\+L\+A\+S\+S\+N\+A\+M\+E} (\hyperlink{a00648}{Glut\+Primitive\+Node})}\label{a00648_ad24f2cf60d14d5b5bd5f8dc2519d6a23}

\item 
\hypertarget{a00648_ad6b853f3b26676319e3099986b38c013}{\hyperlink{a00509}{Draw\+Modes\+::\+Draw\+Mode} \hyperlink{a00648_ad6b853f3b26676319e3099986b38c013}{available\+Draw\+Modes} () const }\label{a00648_ad6b853f3b26676319e3099986b38c013}

\begin{DoxyCompactList}\small\item\em return available draw modes \end{DoxyCompactList}\item 
\hypertarget{a00648_ae0e5754e3f154385e85e04f82f210184}{void \hyperlink{a00648_ae0e5754e3f154385e85e04f82f210184}{bounding\+Box} (\hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+bb\+Min, \hyperlink{a03336_ae4a56bb6b65d7f966934982a1e370213}{Vec3d} \&\+\_\+bb\+Max)}\label{a00648_ae0e5754e3f154385e85e04f82f210184}

\begin{DoxyCompactList}\small\item\em update bounding box \end{DoxyCompactList}\item 
\hypertarget{a00648_a044c624dbbe441d8cd255828db209999}{void \hyperlink{a00648_a044c624dbbe441d8cd255828db209999}{draw} (\hyperlink{a00643}{G\+L\+State} \&\+\_\+state, const \hyperlink{a00509}{Draw\+Modes\+::\+Draw\+Mode} \&\+\_\+draw\+Mode)}\label{a00648_a044c624dbbe441d8cd255828db209999}

\begin{DoxyCompactList}\small\item\em drawing the primitive \end{DoxyCompactList}\item 
\hypertarget{a00648_a35529e8b492e9798b76ed1a2cef1260f}{void {\bfseries draw\+\_\+obj} (int \+\_\+idx) const }\label{a00648_a35529e8b492e9798b76ed1a2cef1260f}

\item 
\hypertarget{a00648_aee272419e842d634fbac05a5543e8b8d}{void \hyperlink{a00648_aee272419e842d634fbac05a5543e8b8d}{pick} (\hyperlink{a00643}{G\+L\+State} \&\+\_\+state, \hyperlink{a03343_af5fad41dadeca314c2077f897377dbd0}{Pick\+Target} \+\_\+target)}\label{a00648_aee272419e842d634fbac05a5543e8b8d}

\begin{DoxyCompactList}\small\item\em picking \end{DoxyCompactList}\item 
void \hyperlink{a00648_ac42f9712fa092f484f2d404ba6acaf3e}{set\+Color\+Internal} (bool \+\_\+set)
\begin{DoxyCompactList}\small\item\em Disable internal color processing. \end{DoxyCompactList}\item 
void \hyperlink{a00648_a2fd23c6b7d191f4d82b56fb42acf4bbc}{get\+Render\+Objects} (\hyperlink{a00738}{I\+Renderer} $\ast$\+\_\+renderer, \hyperlink{a00643}{G\+L\+State} \&\+\_\+state, const \hyperlink{a00509}{Draw\+Modes\+::\+Draw\+Mode} \&\+\_\+draw\+Mode, const \hyperlink{a00789}{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 
\hypertarget{a00648_a52c38485a9bfcb40d9abd8285ec31b76}{std\+::vector$<$ \hyperlink{a01012}{Primitive} $>$ {\bfseries primitives\+\_\+}}\label{a00648_a52c38485a9bfcb40d9abd8285ec31b76}

\item 
\hypertarget{a00648_a4073d5a69ed52c26bfba0972cba716f9}{bool {\bfseries set\+Color\+\_\+}}\label{a00648_a4073d5a69ed52c26bfba0972cba716f9}

\item 
\hypertarget{a00648_abb1ec90955c674e8e8b20819876f1d25}{\hyperlink{a00641}{A\+C\+G\+::\+G\+L\+Sphere} $\ast$ {\bfseries sphere\+\_\+}}\label{a00648_abb1ec90955c674e8e8b20819876f1d25}

\end{DoxyCompactItemize}


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

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



\subsection{Member Function Documentation}
\hypertarget{a00648_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[{add\+\_\+primitive}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::add\+\_\+primitive (
\begin{DoxyParamCaption}
\item[{{\bf Glut\+Primitive\+Type}}]{\+\_\+type, }
\item[{{\bf Vec3d}}]{\+\_\+pos, }
\item[{{\bf Vec3d}}]{\+\_\+axis, }
\item[{{\bf A\+C\+G\+::\+Vec4f}}]{\+\_\+color}
\end{DoxyParamCaption}
)}}\label{a00648_a93f32169793c818bceb610a1bdb8f21c}
Adds a primitive and returns its index.

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


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

\hypertarget{a00648_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[{get\+Render\+Objects}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::get\+Render\+Objects (
\begin{DoxyParamCaption}
\item[{{\bf I\+Renderer} $\ast$}]{\+\_\+renderer, }
\item[{{\bf G\+L\+State} \&}]{\+\_\+state, }
\item[{const {\bf Draw\+Modes\+::\+Draw\+Mode} \&}]{\+\_\+draw\+Mode, }
\item[{const {\bf Material} $\ast$}]{\+\_\+mat}
\end{DoxyParamCaption}
)}}\label{a00648_a2fd23c6b7d191f4d82b56fb42acf4bbc}


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 G\+L 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.

\hypertarget{a00648_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[{set\+Color\+Internal}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Scene\+Graph\+::\+Glut\+Primitive\+Node\+::set\+Color\+Internal (
\begin{DoxyParamCaption}
\item[{bool}]{\+\_\+set}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a00648_ac42f9712fa092f484f2d404ba6acaf3e}


Disable internal color processing. 

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

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



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