imaging::OpenGlViewer Class Reference
[Graphics Module]

Graphics output that renders graphics using GLUT. More...

#include <OpenGlViewer.hpp>

Inheritance diagram for imaging::OpenGlViewer:

imaging::DummyGraphics imaging::GraphicsInterface

List of all members.

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 > &center, 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 GraphicsInterfaceoperator<< (const StreamStatus &status)
virtual GraphicsInterfaceoperator<< (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


Detailed Description

Graphics output that renders graphics using GLUT.

Member Function Documentation

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.

See also:
operator<<(gr & out, const Circle & circle)

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.

See also:
polyline()

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.

See also:
polygon

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.

See also:
operator<<(gr & out, const ublas::fixed_vector<float_t, 2> &)

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.

See also:
operator<<(gr & out, const ColorImage2d &)

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.

See also:
operator<<(gr & out, const Bspline< ublas::fixed_vector<float_t, 2> > &), operator<<(gr & out, const PeriodicBspline< ublas::fixed_vector<float_t, 2> > &), operator<<(gr & out, const BsplineShape & spline_shape)

Reimplemented from imaging::DummyGraphics.

GraphicsInterface & imaging::OpenGlViewer::operator<< ( const CommandInterface command  )  [virtual]

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

  • color,
  • group,
  • z_value,
  • translation, and
  • line width.

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.


Member Data Documentation

Standard graphics output. Currently only output to out is possible.

Reimplemented from imaging::DummyGraphics.

Referenced by write_image().


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5