#include <OpenGlViewer.hpp>
Public Member Functions | |
virtual void | init (int argc, char **argv, const ublas::fixed_vector< float_t, 2 > &lower_left, const ublas::fixed_vector< float_t, 2 > &upper_right, size_t window_width=STD_WINDOW_SIZE, size_t window_height=STD_WINDOW_SIZE) |
virtual void | clear () |
virtual void | set_coordinates (const ublas::fixed_vector< float_t, 2 > &lower_left, const ublas::fixed_vector< float_t, 2 > &upper_right) |
virtual void | circle (const ublas::fixed_vector< float_t, 2 > ¢er, float_t radius) |
virtual void | polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices) |
virtual void | fill_polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices) |
virtual void | polyline (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices) |
virtual void | vertex (const ublas::fixed_vector< float_t, 2 > &vertex) |
virtual void | image (const ColorImage2d &image, const ublas::fixed_vector< float_t, 2 > x_interval, const ublas::fixed_vector< float_t, 2 > y_interval) |
virtual void | spline_curve (const Bspline< ublas::fixed_vector< float_t, 2 > > &spline_curve) |
virtual GraphicsInterface & | operator<< (const StreamStatus &status) |
virtual GraphicsInterface & | operator<< (const CommandInterface &command) |
virtual const StreamStatus & | get_stream_status () |
virtual void | write_image (const std::string &file_name, const int image_format=IMAGE_FORMAT_DETERMINE) |
virtual void | write_image (const std::string &file_name, size_t width, size_t height, const int image_format=IMAGE_FORMAT_DETERMINE) |
Static Public Member Functions | |
static void * | display (void *) |
Static Public Attributes | |
static OpenGlViewer | out |
Friends | |
class | open_gl_viewer_impl::WriteImage |
void imaging::OpenGlViewer::init | ( | int | argc, | |
char ** | argv, | |||
const ublas::fixed_vector< float_t, 2 > & | lower_left, | |||
const ublas::fixed_vector< float_t, 2 > & | upper_right, | |||
size_t | window_width = STD_WINDOW_SIZE , |
|||
size_t | window_height = STD_WINDOW_SIZE | |||
) | [virtual] |
Initializes graphics. The arguments lower_left and upper_right specify the sections of the x-axis and the y-axis which are displayed, window_width and window_height the size of the output window.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::clear | ( | ) | [virtual] |
Clears the graphics output. All groups are reset and all objects removed from the window.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::set_coordinates | ( | const ublas::fixed_vector< float_t, 2 > & | lower_left, | |
const ublas::fixed_vector< float_t, 2 > & | upper_right | |||
) | [virtual] |
Initializes the coordinate system of the graphics output. The arguments lower_left and upper_right specify the sections of the x-axis and the y-axis which are displayed.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::circle | ( | const ublas::fixed_vector< float_t, 2 > & | center, | |
float_t | radius | |||
) | [virtual] |
Draws the circle determined by center and radius.
Reimplemented from imaging::DummyGraphics.
References polygon().
void imaging::OpenGlViewer::polygon | ( | const std::vector< ublas::fixed_vector< float_t, 2 > > & | vertices | ) | [virtual] |
Draws the polygon determined by vertices. The first and the last point in vertices will automatically be connected, i.e. there is no need for them to be the same.
Reimplemented from imaging::DummyGraphics.
Referenced by circle().
void imaging::OpenGlViewer::fill_polygon | ( | const std::vector< ublas::fixed_vector< float_t, 2 > > & | vertices | ) | [virtual] |
Fills the polygon determined by vertices with the current color.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::polyline | ( | const std::vector< ublas::fixed_vector< float_t, 2 > > & | vertices | ) | [virtual] |
Draws the polyline determined by vertices. The first and the last point in vertices will not be connected.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::vertex | ( | const ublas::fixed_vector< float_t, 2 > & | vertex | ) | [virtual] |
Draws vertex as point on the drawing plane.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::image | ( | const ColorImage2d & | image, | |
const ublas::fixed_vector< float_t, 2 > | x_interval, | |||
const ublas::fixed_vector< float_t, 2 > | y_interval | |||
) | [virtual] |
Rescales image such that it fits into the rectangle x_interval x y_interval and draws it.
Reimplemented from imaging::DummyGraphics.
Referenced by operator<<().
void imaging::OpenGlViewer::spline_curve | ( | const Bspline< ublas::fixed_vector< float_t, 2 > > & | spline_curve | ) | [virtual] |
Draws the spline curve of order with knots and coefficient.
Reimplemented from imaging::DummyGraphics.
GraphicsInterface & imaging::OpenGlViewer::operator<< | ( | const CommandInterface & | command | ) | [virtual] |
Pass the stream command command to the stream.
Reimplemented from imaging::DummyGraphics.
References imaging::GraphicsInterface::set_color::color(), imaging::GraphicsInterface::set_group::group_id(), image(), imaging::GraphicsInterface::set_line_width::line_width(), imaging::GraphicsInterface::offset_z_layer::offset(), and imaging::GraphicsInterface::translate::translation().
virtual const StreamStatus& imaging::OpenGlViewer::get_stream_status | ( | ) | [inline, virtual] |
Get the current stream status. Use this function to backup the status and restore it later. The status of a stream is determined by its
Reimplemented from imaging::DummyGraphics.
virtual void imaging::OpenGlViewer::write_image | ( | const std::string & | file_name, | |
const int | image_format = IMAGE_FORMAT_DETERMINE | |||
) | [inline, virtual] |
Write the content of the graphics output to an image file. The file format of the output image is determined by image_format. The size of the image will be the current size of the coordinate axes.
Reimplemented from imaging::DummyGraphics.
void imaging::OpenGlViewer::write_image | ( | const std::string & | file_name, | |
size_t | width, | |||
size_t | height, | |||
const int | image_format = IMAGE_FORMAT_DETERMINE | |||
) | [virtual] |
Write the content of the graphics output to an image file. The file format of the output image is determined by image_format. The size of the image is determined by width and height.
Reimplemented from imaging::DummyGraphics.
References out.
OpenGlViewer imaging::OpenGlViewer::out [static] |
Standard graphics output. Currently only output to out is possible.
Reimplemented from imaging::DummyGraphics.
Referenced by write_image().