#include <Render.h>
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 | |
| void Render::DrawLines | ( | const std::vector< Line > & | lines | ) |
Draws a vector of lines in 2d.
| 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.
| points | the vector of points |
| void Render::DrawQuadraticSpline | ( | const std::vector< Point > & | points | ) |
Draws a quadratic spline using GLSL shaders.
| points | the control points |
| void Render::DrawTriangles | ( | const std::vector< Point > & | points, | |
| const std::vector< int > & | indices | |||
| ) |
Draws a set of triangles.
| points | vertices position | |
| indices | indices |
| float Render::GetPointSize | ( | void | ) | const |
gets point size
| void Render::Initialize | ( | int | width, | |
| int | height | |||
| ) |
Loads a default opengl configuration.
| width | render window width | |
| height | render window height |
glewGetErrorString(err)
| void Render::Reshape | ( | int | width, | |
| int | height | |||
| ) |
Reshapes opengl viewport and initialize states.
| width | render window width | |
| height | render window height |
| void Render::SetMaterial | ( | float | red, | |
| float | green, | |||
| float | blue | |||
| ) |
Sets the only material: emissive color.
| red | red channel | |
| green | green channel | |
| blue | blue channel |
| void Render::UnProjectScreenPoint | ( | const Point & | screenPoint, | |
| double & | x, | |||
| double & | y, | |||
| double & | z | |||
| ) |
unproject a point
| screenPoint | point to be unprojected | |
| x | ||
| y | ||
| z |
1.5.9