\hypertarget{class_gpu_quadratic_curve_render_1_1_render}{
\section{GpuQuadraticCurveRender::Render Class Reference}
\label{class_gpu_quadratic_curve_render_1_1_render}\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
}
Opengl \hyperlink{class_gpu_quadratic_curve_render_1_1_render}{Render} tailored specifically for GpuQuadraticCurveRender test. It can render these 2d geometry:\begin{itemize}
\item Points\item Lines\item Curves It only supports a material being a configurable emissive color. \end{itemize}
 


{\tt \#include $<$Render.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_7174a62a6c57753119367df91e5fce0b}{
\hyperlink{class_gpu_quadratic_curve_render_1_1_render_7174a62a6c57753119367df91e5fce0b}{Render} (void)}
\label{class_gpu_quadratic_curve_render_1_1_render_7174a62a6c57753119367df91e5fce0b}

\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_c885087516e6ea998e4de1e139f8031c}{
\hyperlink{class_gpu_quadratic_curve_render_1_1_render_c885087516e6ea998e4de1e139f8031c}{$\sim$Render} (void)}
\label{class_gpu_quadratic_curve_render_1_1_render_c885087516e6ea998e4de1e139f8031c}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_6e3dcb22e739a3da14e744f67f642110}{Initialize} (int width, int height)
\begin{CompactList}\small\item\em Loads a default opengl configuration. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_1600480e42a7c5610e2c5c676e129419}{Reshape} (int width, int height)
\begin{CompactList}\small\item\em Reshapes opengl viewport and initialize states. \item\end{CompactList}\item 
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_ea42e7281c4007185e26f52cf09f936b}{
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_ea42e7281c4007185e26f52cf09f936b}{BeginFrame} (void)}
\label{class_gpu_quadratic_curve_render_1_1_render_ea42e7281c4007185e26f52cf09f936b}

\begin{CompactList}\small\item\em Begins render frame. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_ddfe0133beb0f01513740c53415ef8eb}{SetMaterial} (float red, float green, float blue)
\begin{CompactList}\small\item\em Sets the only material: emissive color. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_0d8775899d54aeb9dc7cc39ffc4edb50}{DrawPoints} (const std::vector$<$ \hyperlink{class_gpu_quadratic_curve_render_1_1_point}{Point} $>$ \&points)
\begin{CompactList}\small\item\em Draws a vector of points in 2d with a fixed point size. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_b0b81b59746f4ab2fded53ea234e364d}{DrawLines} (const std::vector$<$ Line $>$ \&lines)
\begin{CompactList}\small\item\em Draws a vector of lines in 2d. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_4721e0e475a63c208e7f6e86615aa0df}{DrawTriangles} (const std::vector$<$ \hyperlink{class_gpu_quadratic_curve_render_1_1_point}{Point} $>$ \&points, const std::vector$<$ int $>$ \&indices)
\begin{CompactList}\small\item\em Draws a set of triangles. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_1668757ecf873c0d70adc985b878a8bc}{DrawQuadraticSpline} (const std::vector$<$ \hyperlink{class_gpu_quadratic_curve_render_1_1_point}{Point} $>$ \&points)
\begin{CompactList}\small\item\em Draws a quadratic spline using GLSL shaders. \item\end{CompactList}\item 
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_81b0cb50cfb713e9cf01b96ee290c0eb}{
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_81b0cb50cfb713e9cf01b96ee290c0eb}{EndFrame} (void)}
\label{class_gpu_quadratic_curve_render_1_1_render_81b0cb50cfb713e9cf01b96ee290c0eb}

\begin{CompactList}\small\item\em Ends render frame. \item\end{CompactList}\item 
void \hyperlink{class_gpu_quadratic_curve_render_1_1_render_d392642067cd84dc19488c2c3d13f792}{UnProjectScreenPoint} (const \hyperlink{class_gpu_quadratic_curve_render_1_1_point}{Point} \&screenPoint, double \&x, double \&y, double \&z)
\begin{CompactList}\small\item\em unproject a point \item\end{CompactList}\item 
float \hyperlink{class_gpu_quadratic_curve_render_1_1_render_17b90f9039530210de74f045eaea586a}{GetPointSize} (void) const 
\begin{CompactList}\small\item\em gets point size \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Opengl \hyperlink{class_gpu_quadratic_curve_render_1_1_render}{Render} tailored specifically for GpuQuadraticCurveRender test. It can render these 2d geometry:\begin{itemize}
\item Points\item Lines\item Curves It only supports a material being a configurable emissive color. \end{itemize}


\subsection{Member Function Documentation}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_b0b81b59746f4ab2fded53ea234e364d}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!DrawLines@{DrawLines}}
\index{DrawLines@{DrawLines}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{DrawLines}]{\setlength{\rightskip}{0pt plus 5cm}void Render::DrawLines (const std::vector$<$ Line $>$ \& {\em lines})}}
\label{class_gpu_quadratic_curve_render_1_1_render_b0b81b59746f4ab2fded53ea234e364d}


Draws a vector of lines in 2d. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em lines}]the vector of lines \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_0d8775899d54aeb9dc7cc39ffc4edb50}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!DrawPoints@{DrawPoints}}
\index{DrawPoints@{DrawPoints}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{DrawPoints}]{\setlength{\rightskip}{0pt plus 5cm}void Render::DrawPoints (const std::vector$<$ {\bf Point} $>$ \& {\em points})}}
\label{class_gpu_quadratic_curve_render_1_1_render_0d8775899d54aeb9dc7cc39ffc4edb50}


Draws a vector of points in 2d with a fixed point size. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em points}]the vector of points \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_1668757ecf873c0d70adc985b878a8bc}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!DrawQuadraticSpline@{DrawQuadraticSpline}}
\index{DrawQuadraticSpline@{DrawQuadraticSpline}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{DrawQuadraticSpline}]{\setlength{\rightskip}{0pt plus 5cm}void Render::DrawQuadraticSpline (const std::vector$<$ {\bf Point} $>$ \& {\em points})}}
\label{class_gpu_quadratic_curve_render_1_1_render_1668757ecf873c0d70adc985b878a8bc}


Draws a quadratic spline using GLSL shaders. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em points}]the control points \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_4721e0e475a63c208e7f6e86615aa0df}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!DrawTriangles@{DrawTriangles}}
\index{DrawTriangles@{DrawTriangles}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{DrawTriangles}]{\setlength{\rightskip}{0pt plus 5cm}void Render::DrawTriangles (const std::vector$<$ {\bf Point} $>$ \& {\em points}, \/  const std::vector$<$ int $>$ \& {\em indices})}}
\label{class_gpu_quadratic_curve_render_1_1_render_4721e0e475a63c208e7f6e86615aa0df}


Draws a set of triangles. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em points}]vertices position \item[{\em indices}]indices \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_17b90f9039530210de74f045eaea586a}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!GetPointSize@{GetPointSize}}
\index{GetPointSize@{GetPointSize}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{GetPointSize}]{\setlength{\rightskip}{0pt plus 5cm}float Render::GetPointSize (void) const}}
\label{class_gpu_quadratic_curve_render_1_1_render_17b90f9039530210de74f045eaea586a}


gets point size 

\begin{Desc}
\item[Returns:]points size \end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_6e3dcb22e739a3da14e744f67f642110}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!Initialize@{Initialize}}
\index{Initialize@{Initialize}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{Initialize}]{\setlength{\rightskip}{0pt plus 5cm}void Render::Initialize (int {\em width}, \/  int {\em height})}}
\label{class_gpu_quadratic_curve_render_1_1_render_6e3dcb22e739a3da14e744f67f642110}


Loads a default opengl configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em width}]render window width \item[{\em height}]render window height \end{description}
\end{Desc}
\begin{Desc}
\item[Note:]It's very ugly to have a separete method for initialization and don't use the constructor. \end{Desc}


glewGetErrorString(err)

\begin{Desc}
\item[\hyperlink{todo__todo000001}{Todo}]it should be used RAII through boost smart pointers \end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_1600480e42a7c5610e2c5c676e129419}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!Reshape@{Reshape}}
\index{Reshape@{Reshape}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{Reshape}]{\setlength{\rightskip}{0pt plus 5cm}void Render::Reshape (int {\em width}, \/  int {\em height})}}
\label{class_gpu_quadratic_curve_render_1_1_render_1600480e42a7c5610e2c5c676e129419}


Reshapes opengl viewport and initialize states. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em width}]render window width \item[{\em height}]render window height \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_ddfe0133beb0f01513740c53415ef8eb}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!SetMaterial@{SetMaterial}}
\index{SetMaterial@{SetMaterial}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{SetMaterial}]{\setlength{\rightskip}{0pt plus 5cm}void Render::SetMaterial (float {\em red}, \/  float {\em green}, \/  float {\em blue})}}
\label{class_gpu_quadratic_curve_render_1_1_render_ddfe0133beb0f01513740c53415ef8eb}


Sets the only material: emissive color. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em red}]red channel \item[{\em green}]green channel \item[{\em blue}]blue channel \end{description}
\end{Desc}
\hypertarget{class_gpu_quadratic_curve_render_1_1_render_d392642067cd84dc19488c2c3d13f792}{
\index{GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}!UnProjectScreenPoint@{UnProjectScreenPoint}}
\index{UnProjectScreenPoint@{UnProjectScreenPoint}!GpuQuadraticCurveRender::Render@{GpuQuadraticCurveRender::Render}}
\subsubsection[{UnProjectScreenPoint}]{\setlength{\rightskip}{0pt plus 5cm}void Render::UnProjectScreenPoint (const {\bf Point} \& {\em screenPoint}, \/  double \& {\em x}, \/  double \& {\em y}, \/  double \& {\em z})}}
\label{class_gpu_quadratic_curve_render_1_1_render_d392642067cd84dc19488c2c3d13f792}


unproject a point 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em screenPoint}]point to be unprojected \item[{\em x}]\item[{\em y}]\item[{\em z}]\end{description}
\end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
src/GpuQuadraticCurveRender/\hyperlink{_render_8h}{Render.h}\item 
src/GpuQuadraticCurveRender/\hyperlink{_render_8cpp}{Render.cpp}\end{CompactItemize}
