Classes | Public Member Functions | Private Attributes
pcl::visualization::PCLPainter2D Class Reference

PCL Painter2D main class. Class for drawing 2D figures. More...

#include <pcl_painter2D.h>

List of all members.

Classes

struct  ExitMainLoopTimerCallback

Public Member Functions

void addArc (float x, float y, float r, float start_angle, float end_angle)
 Draw an arc based on the inputs.
void addCircle (float x, float y, float r)
 Draw a circle based on the inputs.
void addEllipse (float x, float y, float rx, float ry)
 Draw an ellipse based on the inputs.
void addEllipticArc (float x, float y, float rx, float ry, float start_angle, float end_angle)
 Draw an elliptic arc based on the inputs.
void addLine (float x1, float y1, float x2, float y2)
 Draw a line between the specified points.
void addLine (std::vector< float > p)
 Draw line(s) between the specified points.
void addPoint (float x, float y)
 Draw specified point(s).
void addPoints (std::vector< float > points)
 Draw specified point(s).
void addPolygon (std::vector< float > p)
 Draw a polygon between the specified points.
void addQuad (std::vector< float > p)
 Draw a quadrilateral based on the given points.
void addRect (float x, float y, float width, float height)
 Draw a rectangle based on the given points.
void clearFigures ()
 remove all the figures from the window
void clearTransform ()
 Clears all the transformation applied. Sets the transformation matrix to Identity.
void display ()
 displays all the figures added in a window.
double * getBackgroundColor ()
 set/get method for the viewport's background color.
vtkBrush * getBrush ()
unsigned char * getBrushColor ()
vtkPen * getPen ()
unsigned char * getPenColor ()
 set/get methods for current working vtkPen
int getPenType ()
float getPenWidth ()
vtkMatrix3x3 * getTransform ()
 Returns the current transformation matrix.
int * getWindowSize ()
 set/get method for the window size.
virtual bool Paint (vtkContext2D *painter)
 Paint event for the chart, called whenever the chart needs to be drawn.
 PCLPainter2D (char const *name="PCLPainter2D")
 Constructor of the class.
void rotatePen (double angle)
 Create a rotation matrix and concatenate it with the current transformation.
void scalePen (double x, double y)
 Create a scale matrix and concatenate it with the current transformation.
void setBackgroundColor (const double r, const double g, const double b)
 set/get method for the viewport's background color.
void setBackgroundColor (const double color[3])
 set/get method for the viewport's background color.
void setBrush (vtkBrush *brush)
 set/get methods for current working vtkBrush
void setBrushColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void setPen (vtkPen *pen)
void setPenColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 set/get methods for current working vtkPen
void setPenType (int type)
void setPenWidth (float w)
void setTransform (vtkMatrix3x3 *matrix)
 Create a translation matrix and concatenate it with the current transformation.
void setWindowSize (int w, int h)
 set/get method for the window size.
void spin ()
 spins (runs the event loop) the interactor indefinitely. Same as display() - added to retain the similarity between other existing visualization classes
void spinOnce (const int spin_time=0)
 spins (runs the event loop) the interactor for spin_time amount of time. The name is confusing and will be probably obsolete in the future release with a single overloaded spin()/display() function.
void translatePen (double x, double y)
 Create a translation matrix and concatenate it with the current transformation.
 vtkTypeRevisionMacro (PCLPainter2D, vtkContextItem)

Private Attributes

double bkg_color_ [3]
vtkBrush * current_brush_
vtkPen * current_pen_
vtkTransform2D * current_transform_
vtkSmartPointer
< ExitMainLoopTimerCallback
exit_loop_timer_
 Callback object enabling us to leave the main loop, when a timer fires.
std::vector< Figure2D * > figures_
vtkContextView * view_
int win_height_
int win_width_

Detailed Description

PCL Painter2D main class. Class for drawing 2D figures.

Author:
Kripasindhu Sarkar

Definition at line 200 of file pcl_painter2D.h.


Constructor & Destructor Documentation

pcl::visualization::PCLPainter2D::PCLPainter2D ( char const *  name = "PCLPainter2D")

Constructor of the class.

Definition at line 44 of file pcl_painter2D.cpp.


Member Function Documentation

void pcl::visualization::PCLPainter2D::addArc ( float  x,
float  y,
float  r,
float  start_angle,
float  end_angle 
)

Draw an arc based on the inputs.

Parameters:
[in]xX coordinate of the origin
[in]yY coordinate of the origin
[in]rradius of the circle
[in]start_anglethe starting angle of the arc expressed in degrees
[in]end_anglethe ending angle of the arc expressed in degrees

Definition at line 154 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addCircle ( float  x,
float  y,
float  r 
)

Draw a circle based on the inputs.

Parameters:
[in]xX coordinate of the origin
[in]yY coordinate of the origin
[in]rradius of the circle

Definition at line 140 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addEllipse ( float  x,
float  y,
float  rx,
float  ry 
)

Draw an ellipse based on the inputs.

Parameters:
[in]xX coordinate of the origin
[in]yY coordinate of the origin
[in]rxX radius of the ellipse
[in]ryY radius of the ellipse

Definition at line 133 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addEllipticArc ( float  x,
float  y,
float  rx,
float  ry,
float  start_angle,
float  end_angle 
)

Draw an elliptic arc based on the inputs.

Parameters:
[in]xX coordinate of the origin
[in]yY coordinate of the origin
[in]rxX radius of the ellipse
[in]ryY radius of the ellipse
[in]start_anglethe starting angle of the arc expressed in degrees
[in]end_anglethe ending angle of the arc expressed in degrees

Definition at line 147 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addLine ( float  x1,
float  y1,
float  x2,
float  y2 
)

Draw a line between the specified points.

Parameters:
[in]x1X coordinate of the starting point of the line
[in]y1Y coordinate of the starting point of the line
[in]x2X coordinate of the ending point of the line
[in]y2Y coordinate of the ending point of the line

Definition at line 67 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addLine ( std::vector< float >  p)

Draw line(s) between the specified points.

Parameters:
[in]pa vector of size 2*n and the points are packed x1, y1, x2, y2 etc.

Definition at line 81 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addPoint ( float  x,
float  y 
)

Draw specified point(s).

Parameters:
[in]xX coordinate of the point
[in]yY coordinate of the point

Definition at line 88 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addPoints ( std::vector< float >  points)

Draw specified point(s).

Parameters:
[in]pointsa vector of size 2*n and the points are packed x1, y1, x2, y2 etc.

Definition at line 98 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addPolygon ( std::vector< float >  p)

Draw a polygon between the specified points.

Parameters:
[in]pa vector of size 2*n and the points are packed x1, y1, x2, y2 etc.

Definition at line 126 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addQuad ( std::vector< float >  p)

Draw a quadrilateral based on the given points.

Parameters:
[in]pa vector of size 8 and the points are packed x1, y1, x2, y2, x3, y3 and x4, y4.

Definition at line 119 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::addRect ( float  x,
float  y,
float  width,
float  height 
)

Draw a rectangle based on the given points.

Parameters:
[in]xX coordinate of the origin
[in]yY coordinate of the origin
[in]widthwidth of the rectangle
[in]heightheight of the rectangle

Definition at line 105 of file pcl_painter2D.cpp.

remove all the figures from the window

Definition at line 265 of file pcl_painter2D.cpp.

Clears all the transformation applied. Sets the transformation matrix to Identity.

Definition at line 258 of file pcl_painter2D.cpp.

displays all the figures added in a window.

Definition at line 273 of file pcl_painter2D.cpp.

set/get method for the viewport's background color.

Returns:
[out] color the array containing the 3 component of the RGB color

Definition at line 335 of file pcl_painter2D.cpp.

Definition at line 216 of file pcl_painter2D.cpp.

Definition at line 196 of file pcl_painter2D.cpp.

Definition at line 206 of file pcl_painter2D.cpp.

set/get methods for current working vtkPen

Definition at line 176 of file pcl_painter2D.cpp.

Definition at line 186 of file pcl_painter2D.cpp.

Definition at line 181 of file pcl_painter2D.cpp.

Returns the current transformation matrix.

Definition at line 251 of file pcl_painter2D.cpp.

set/get method for the window size.

Returns:
[in] array containing the width and height of the window

Definition at line 354 of file pcl_painter2D.cpp.

bool pcl::visualization::PCLPainter2D::Paint ( vtkContext2D *  painter) [virtual]

Paint event for the chart, called whenever the chart needs to be drawn.

Parameters:
[in]nameName of the window

Definition at line 364 of file pcl_painter2D.cpp.

Create a rotation matrix and concatenate it with the current transformation.

Parameters:
[in]angleangle in degrees

Definition at line 230 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::scalePen ( double  x,
double  y 
)

Create a scale matrix and concatenate it with the current transformation.

Parameters:
[in]xtranslation along X axis
[in]ytranslation along Y axis

Definition at line 237 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::setBackgroundColor ( const double  r,
const double  g,
const double  b 
)

set/get method for the viewport's background color.

Parameters:
[in]rthe red component of the RGB color
[in]gthe green component of the RGB color
[in]bthe blue component of the RGB color

Definition at line 317 of file pcl_painter2D.cpp.

set/get method for the viewport's background color.

Parameters:
[in]colorthe array containing the 3 component of the RGB color

Definition at line 326 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::setBrush ( vtkBrush *  brush)

set/get methods for current working vtkBrush

Definition at line 211 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::setBrushColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

Definition at line 191 of file pcl_painter2D.cpp.

Definition at line 201 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::setPenColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)

set/get methods for current working vtkPen

Definition at line 161 of file pcl_painter2D.cpp.

Definition at line 171 of file pcl_painter2D.cpp.

Definition at line 166 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::setTransform ( vtkMatrix3x3 *  matrix)

Create a translation matrix and concatenate it with the current transformation.

Parameters:
[in]xtranslation along X axis
[in]ytranslation along Y axis

Definition at line 244 of file pcl_painter2D.cpp.

set/get method for the window size.

Parameters:
[in]wthe width of the window
[in]hthe height of the window

Definition at line 346 of file pcl_painter2D.cpp.

spins (runs the event loop) the interactor indefinitely. Same as display() - added to retain the similarity between other existing visualization classes

Definition at line 310 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::spinOnce ( const int  spin_time = 0)

spins (runs the event loop) the interactor for spin_time amount of time. The name is confusing and will be probably obsolete in the future release with a single overloaded spin()/display() function.

Parameters:
[in]spin_time- How long (in ms) should the visualization loop be allowed to run.

Definition at line 288 of file pcl_painter2D.cpp.

void pcl::visualization::PCLPainter2D::translatePen ( double  x,
double  y 
)

Create a translation matrix and concatenate it with the current transformation.

Parameters:
[in]xtranslation along X axis
[in]ytranslation along Y axis

Definition at line 223 of file pcl_painter2D.cpp.


Member Data Documentation

Definition at line 429 of file pcl_painter2D.h.

Definition at line 426 of file pcl_painter2D.h.

Definition at line 425 of file pcl_painter2D.h.

Definition at line 427 of file pcl_painter2D.h.

Callback object enabling us to leave the main loop, when a timer fires.

Definition at line 466 of file pcl_painter2D.h.

Definition at line 422 of file pcl_painter2D.h.

vtkContextView* pcl::visualization::PCLPainter2D::view_ [private]

Definition at line 431 of file pcl_painter2D.h.

Definition at line 428 of file pcl_painter2D.h.

Definition at line 428 of file pcl_painter2D.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:47:19