imaging::GraphicsInterface Class Reference
[Graphics Module]

Abstract class interface for graphics output. More...

#include <GraphicsInterface.hpp>

Inheritance diagram for imaging::GraphicsInterface:

imaging::DummyGraphics imaging::OpenGlViewer

List of all members.

Public Member Functions

virtual void clear ()=0
virtual void set_coordinates (const ublas::fixed_vector< float_t, 2 > &lower_left, const ublas::fixed_vector< float_t, 2 > &upper_right)=0
void line_segment (const ublas::fixed_vector< float_t, 2 > &v_0, const ublas::fixed_vector< float_t, 2 > &v_1)
void arrow (const ublas::fixed_vector< float_t, 2 > &starting_point, const ublas::fixed_vector< float_t, 2 > &direction)
void quadrangle (const ublas::fixed_vector< float_t, 2 > &v_0, const ublas::fixed_vector< float_t, 2 > &v_1, const ublas::fixed_vector< float_t, 2 > &v_2, const ublas::fixed_vector< float_t, 2 > &v_3)
void triangle (const ublas::fixed_vector< float_t, 2 > &v_0, const ublas::fixed_vector< float_t, 2 > &v_1, const ublas::fixed_vector< float_t, 2 > &v_2)
virtual void circle (const ublas::fixed_vector< float_t, 2 > &center, float_t radius)=0
virtual void polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)=0
virtual void fill_polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)=0
virtual void polyline (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)=0
virtual void vertex (const ublas::fixed_vector< float_t, 2 > &vertex)=0
virtual void image (const ColorImage2d &image, const ublas::fixed_vector< float_t, 2 > x_interval, const ublas::fixed_vector< float_t, 2 > y_interval)=0
virtual void spline_curve (const Bspline< ublas::fixed_vector< float_t, 2 > > &spline_curve)=0
virtual GraphicsInterfaceoperator<< (const CommandInterface &command)=0
virtual GraphicsInterfaceoperator<< (const StreamStatus &status)=0
virtual const StreamStatusget_stream_status ()=0

Static Public Attributes

static const FlushCommand flush
static const ResetCommand reset_group

Classes

class  CommandInterface
 Graphic stream commands. More...
class  FlushCommand
class  offset_z_layer
 Graphics command to offset the current z-value. More...
class  ResetCommand
class  set_color
 Graphics command to set the current color. More...
class  set_group
 Graphics command to set the current group. More...
class  set_line_width
 Graphics command to set the current line width. More...
class  StreamStatus
 Class which stores the current status of the graphics output. More...
class  translate
 Graphics command to translate the current coordinate system. More...


Detailed Description

Abstract class interface for graphics output.

Member Function Documentation

virtual void imaging::GraphicsInterface::clear (  )  [pure virtual]

Clears the graphics output. All groups are reset and all objects removed from the window.

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

virtual void imaging::GraphicsInterface::set_coordinates ( const ublas::fixed_vector< float_t, 2 > &  lower_left,
const ublas::fixed_vector< float_t, 2 > &  upper_right 
) [pure 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.

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

void imaging::GraphicsInterface::line_segment ( const ublas::fixed_vector< float_t, 2 > &  v_0,
const ublas::fixed_vector< float_t, 2 > &  v_1 
)

Draws the line segment determined by v_0 and v_1.

References polyline().

Referenced by arrow().

void imaging::GraphicsInterface::arrow ( const ublas::fixed_vector< float_t, 2 > &  starting_point,
const ublas::fixed_vector< float_t, 2 > &  direction 
)

Draws the vector direction at starting_point and adds an arrowhead.

References line_segment(), imaging::PI, and imaging::rotation_matrix().

void imaging::GraphicsInterface::quadrangle ( const ublas::fixed_vector< float_t, 2 > &  v_0,
const ublas::fixed_vector< float_t, 2 > &  v_1,
const ublas::fixed_vector< float_t, 2 > &  v_2,
const ublas::fixed_vector< float_t, 2 > &  v_3 
)

Draws the quadrangle determined by v_0, v_1, v_2 and v_3.

References polygon().

void imaging::GraphicsInterface::triangle ( const ublas::fixed_vector< float_t, 2 > &  v_0,
const ublas::fixed_vector< float_t, 2 > &  v_1,
const ublas::fixed_vector< float_t, 2 > &  v_2 
)

Draws the triangle determined by v_0, v_1 and v_2.

References polygon().

virtual void imaging::GraphicsInterface::circle ( const ublas::fixed_vector< float_t, 2 > &  center,
float_t  radius 
) [pure virtual]

Draws the circle determined by center and radius.

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

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by imaging::operator<<().

virtual void imaging::GraphicsInterface::polygon ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [pure 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()

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by imaging::operator<<(), quadrangle(), and triangle().

virtual void imaging::GraphicsInterface::fill_polygon ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [pure virtual]

Fills the polygon determined by vertices with the current color.

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

virtual void imaging::GraphicsInterface::polyline ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [pure virtual]

Draws the polyline determined by vertices. The first and the last point in vertices will not be connected.

See also:
polygon

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by line_segment(), and imaging::operator<<().

virtual void imaging::GraphicsInterface::vertex ( const ublas::fixed_vector< float_t, 2 > &  vertex  )  [pure virtual]

Draws vertex as point on the drawing plane.

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

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by imaging::operator<<().

virtual void imaging::GraphicsInterface::image ( const ColorImage2d image,
const ublas::fixed_vector< float_t, 2 >  x_interval,
const ublas::fixed_vector< float_t, 2 >  y_interval 
) [pure 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 &)

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by imaging::operator<<().

virtual void imaging::GraphicsInterface::spline_curve ( const Bspline< ublas::fixed_vector< float_t, 2 > > &  spline_curve  )  [pure 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)

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

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

Pass the stream command command to the stream.

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

virtual GraphicsInterface& imaging::GraphicsInterface::operator<< ( const StreamStatus status  )  [pure virtual]

Pass the stream status status to the stream.

virtual const StreamStatus& imaging::GraphicsInterface::get_stream_status (  )  [pure 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.

Implemented in imaging::DummyGraphics, and imaging::OpenGlViewer.

Referenced by imaging::operator<<().


Member Data Documentation

const GraphicsInterface::FlushCommand imaging::GraphicsInterface::flush [static]

Graphics command to flush the current group.

const GraphicsInterface::ResetCommand imaging::GraphicsInterface::reset_group [static]

Graphics command to reset the current group.


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