GpuQuadraticCurveRender::Render Class Reference

Opengl Render tailored specifically for GpuQuadraticCurveRender test. It can render these 2d geometry: More...

#include <Render.h>

List of all members.

Public Member Functions

 Render (void)
 Constructor.
 ~Render (void)
 Destructor.
void Initialize (int width, int height)
 Loads a default opengl configuration.
void Reshape (int width, int height)
 Reshapes opengl viewport and initialize states.
void BeginFrame (void)
 Begins render frame.
void SetMaterial (float red, float green, float blue)
 Sets the only material: emissive color.
void DrawPoints (const std::vector< Point > &points)
 Draws a vector of points in 2d with a fixed point size.
void DrawLines (const std::vector< Line > &lines)
 Draws a vector of lines in 2d.
void DrawTriangles (const std::vector< Point > &points, const std::vector< int > &indices)
 Draws a set of triangles.
void DrawQuadraticSpline (const std::vector< Point > &points)
 Draws a quadratic spline using GLSL shaders.
void EndFrame (void)
 Ends render frame.
void UnProjectScreenPoint (const Point &screenPoint, double &x, double &y, double &z)
 unproject a point
float GetPointSize (void) const
 gets point size


Detailed Description

Opengl Render tailored specifically for GpuQuadraticCurveRender test. It can render these 2d geometry:

Member Function Documentation

void Render::DrawLines ( const std::vector< Line > &  lines  ) 

Draws a vector of lines in 2d.

Parameters:
lines the vector of lines

void Render::DrawPoints ( const std::vector< Point > &  points  ) 

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

Parameters:
points the vector of points

void Render::DrawQuadraticSpline ( const std::vector< Point > &  points  ) 

Draws a quadratic spline using GLSL shaders.

Parameters:
points the control points

void Render::DrawTriangles ( const std::vector< Point > &  points,
const std::vector< int > &  indices 
)

Draws a set of triangles.

Parameters:
points vertices position
indices indices

float Render::GetPointSize ( void   )  const

gets point size

Returns:
points size

void Render::Initialize ( int  width,
int  height 
)

Loads a default opengl configuration.

Parameters:
width render window width
height render window height
Note:
It's very ugly to have a separete method for initialization and don't use the constructor.

glewGetErrorString(err)

Todo:
it should be used RAII through boost smart pointers

void Render::Reshape ( int  width,
int  height 
)

Reshapes opengl viewport and initialize states.

Parameters:
width render window width
height render window height

void Render::SetMaterial ( float  red,
float  green,
float  blue 
)

Sets the only material: emissive color.

Parameters:
red red channel
green green channel
blue blue channel

void Render::UnProjectScreenPoint ( const Point screenPoint,
double &  x,
double &  y,
double &  z 
)

unproject a point

Parameters:
screenPoint point to be unprojected
x 
y 
z 


The documentation for this class was generated from the following files:

Generated on Thu Jun 4 22:03:35 2009 for Gpu Quadratic Curve Render Test by  doxygen 1.5.9