|
Point Cloud Library (PCL)
1.15.1-dev
|
PCL Painter2D main class. More...
#include <pcl/visualization/pcl_painter2D.h>
Inheritance diagram for pcl::visualization::PCLPainter2D:
Collaboration diagram for pcl::visualization::PCLPainter2D:Public Member Functions | |
| PCLPainter2D (char const *name="PCLPainter2D") | |
| Constructor of the class. More... | |
| vtkTypeMacro (PCLPainter2D, vtkContextItem) | |
| bool | Paint (vtkContext2D *painter) override |
| Paint event for the chart, called whenever the chart needs to be drawn. More... | |
| void | addLine (float x1, float y1, float x2, float y2) |
| Draw a line between the specified points. More... | |
| void | addLine (std::vector< float > p) |
| Draw line(s) between the specified points. More... | |
| void | addPoint (float x, float y) |
| Draw specified point(s). More... | |
| void | addPoints (std::vector< float > points) |
| Draw specified point(s). More... | |
| void | addRect (float x, float y, float width, float height) |
| Draw a rectangle based on the given points. More... | |
| void | addQuad (std::vector< float > p) |
| Draw a quadrilateral based on the given points. More... | |
| void | addPolygon (std::vector< float > p) |
| Draw a polygon between the specified points. More... | |
| void | addEllipse (float x, float y, float rx, float ry) |
| Draw an ellipse based on the inputs. More... | |
| void | addCircle (float x, float y, float r) |
| Draw a circle based on the inputs. More... | |
| void | addEllipticArc (float x, float y, float rx, float ry, float start_angle, float end_angle) |
| Draw an elliptic arc based on the inputs. More... | |
| void | addArc (float x, float y, float r, float start_angle, float end_angle) |
| Draw an arc based on the inputs. More... | |
| void | translatePen (double x, double y) |
| Create a translation matrix and concatenate it with the current transformation. More... | |
| void | rotatePen (double angle) |
| Create a rotation matrix and concatenate it with the current transformation. More... | |
| void | scalePen (double x, double y) |
| Create a scale matrix and concatenate it with the current transformation. More... | |
| void | setTransform (vtkMatrix3x3 *matrix) |
| Create a translation matrix and concatenate it with the current transformation. More... | |
| vtkMatrix3x3 * | getTransform () |
| Returns the current transformation matrix. More... | |
| void | clearTransform () |
| Clears all the transformation applied. More... | |
| void | clearFigures () |
| remove all the figures from the window More... | |
| void | setPenColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| set/get methods for current working vtkPen More... | |
| void | setPenWidth (float w) |
| void | setPenType (int type) |
| unsigned char * | getPenColor () |
| set/get methods for current working vtkPen More... | |
| float | getPenWidth () |
| int | getPenType () |
| void | setPen (vtkPen *pen) |
| vtkPen * | getPen () |
| void | setBrush (vtkBrush *brush) |
| set/get methods for current working vtkBrush More... | |
| vtkBrush * | getBrush () |
| void | setBrushColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| unsigned char * | getBrushColor () |
| void | setBackgroundColor (const double r, const double g, const double b) |
| set/get method for the viewport's background color. More... | |
| void | setBackgroundColor (const double color[3]) |
| set/get method for the viewport's background color. More... | |
| double * | getBackgroundColor () |
| set/get method for the viewport's background color. More... | |
| void | setWindowSize (int w, int h) |
| set/get method for the window size. More... | |
| int * | getWindowSize () const |
| set/get method for the window size. More... | |
| void | display () |
| displays all the figures added in a window. More... | |
| void | spinOnce (const int spin_time=0) |
| spins (runs the event loop) the interactor for spin_time amount of time. More... | |
| void | spin () |
| spins (runs the event loop) the interactor indefinitely. More... | |
PCL Painter2D main class.
Class for drawing 2D figures
Definition at line 203 of file pcl_painter2D.h.
| pcl::visualization::PCLPainter2D::PCLPainter2D | ( | char const * | name = "PCLPainter2D" | ) |
Constructor of the class.
| void pcl::visualization::PCLPainter2D::addArc | ( | float | x, |
| float | y, | ||
| float | r, | ||
| float | start_angle, | ||
| float | end_angle | ||
| ) |
Draw an arc based on the inputs.
| [in] | x | X coordinate of the origin |
| [in] | y | Y coordinate of the origin |
| [in] | r | radius of the circle |
| [in] | start_angle | the starting angle of the arc expressed in degrees |
| [in] | end_angle | the ending angle of the arc expressed in degrees |
| void pcl::visualization::PCLPainter2D::addCircle | ( | float | x, |
| float | y, | ||
| float | r | ||
| ) |
Draw a circle based on the inputs.
| [in] | x | X coordinate of the origin |
| [in] | y | Y coordinate of the origin |
| [in] | r | radius of the circle |
| void pcl::visualization::PCLPainter2D::addEllipse | ( | float | x, |
| float | y, | ||
| float | rx, | ||
| float | ry | ||
| ) |
Draw an ellipse based on the inputs.
| [in] | x | X coordinate of the origin |
| [in] | y | Y coordinate of the origin |
| [in] | rx | X radius of the ellipse |
| [in] | ry | Y radius of the ellipse |
| 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.
| [in] | x | X coordinate of the origin |
| [in] | y | Y coordinate of the origin |
| [in] | rx | X radius of the ellipse |
| [in] | ry | Y radius of the ellipse |
| [in] | start_angle | the starting angle of the arc expressed in degrees |
| [in] | end_angle | the ending angle of the arc expressed in degrees |
| void pcl::visualization::PCLPainter2D::addLine | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
Draw a line between the specified points.
| [in] | x1 | X coordinate of the starting point of the line |
| [in] | y1 | Y coordinate of the starting point of the line |
| [in] | x2 | X coordinate of the ending point of the line |
| [in] | y2 | Y coordinate of the ending point of the line |
| void pcl::visualization::PCLPainter2D::addLine | ( | std::vector< float > | p | ) |
Draw line(s) between the specified points.
| [in] | p | a vector of size 2*n and the points are packed x1, y1, x2, y2 etc. |
| void pcl::visualization::PCLPainter2D::addPoint | ( | float | x, |
| float | y | ||
| ) |
Draw specified point(s).
| [in] | x | X coordinate of the point |
| [in] | y | Y coordinate of the point |
| void pcl::visualization::PCLPainter2D::addPoints | ( | std::vector< float > | points | ) |
Draw specified point(s).
| [in] | points | a vector of size 2*n and the points are packed x1, y1, x2, y2 etc. |
| void pcl::visualization::PCLPainter2D::addPolygon | ( | std::vector< float > | p | ) |
Draw a polygon between the specified points.
| [in] | p | a vector of size 2*n and the points are packed x1, y1, x2, y2 etc. |
| void pcl::visualization::PCLPainter2D::addQuad | ( | std::vector< float > | p | ) |
Draw a quadrilateral based on the given points.
| [in] | p | a vector of size 8 and the points are packed x1, y1, x2, y2, x3, y3 and x4, y4. |
| void pcl::visualization::PCLPainter2D::addRect | ( | float | x, |
| float | y, | ||
| float | width, | ||
| float | height | ||
| ) |
Draw a rectangle based on the given points.
| [in] | x | X coordinate of the origin |
| [in] | y | Y coordinate of the origin |
| [in] | width | width of the rectangle |
| [in] | height | height of the rectangle |
| void pcl::visualization::PCLPainter2D::clearFigures | ( | ) |
remove all the figures from the window
| void pcl::visualization::PCLPainter2D::clearTransform | ( | ) |
Clears all the transformation applied.
Sets the transformation matrix to Identity
| void pcl::visualization::PCLPainter2D::display | ( | ) |
displays all the figures added in a window.
| double* pcl::visualization::PCLPainter2D::getBackgroundColor | ( | ) |
set/get method for the viewport's background color.
| vtkBrush* pcl::visualization::PCLPainter2D::getBrush | ( | ) |
| unsigned char* pcl::visualization::PCLPainter2D::getBrushColor | ( | ) |
| vtkPen* pcl::visualization::PCLPainter2D::getPen | ( | ) |
| unsigned char* pcl::visualization::PCLPainter2D::getPenColor | ( | ) |
set/get methods for current working vtkPen
| int pcl::visualization::PCLPainter2D::getPenType | ( | ) |
| float pcl::visualization::PCLPainter2D::getPenWidth | ( | ) |
| vtkMatrix3x3* pcl::visualization::PCLPainter2D::getTransform | ( | ) |
Returns the current transformation matrix.
| int* pcl::visualization::PCLPainter2D::getWindowSize | ( | ) | const |
set/get method for the window size.
|
override |
Paint event for the chart, called whenever the chart needs to be drawn.
| [in] | painter | Name of the window |
| void pcl::visualization::PCLPainter2D::rotatePen | ( | double | angle | ) |
Create a rotation matrix and concatenate it with the current transformation.
| [in] | angle | angle in degrees |
| void pcl::visualization::PCLPainter2D::scalePen | ( | double | x, |
| double | y | ||
| ) |
Create a scale matrix and concatenate it with the current transformation.
| [in] | x | translation along X axis |
| [in] | y | translation along Y axis |
| void pcl::visualization::PCLPainter2D::setBackgroundColor | ( | const double | color[3] | ) |
set/get method for the viewport's background color.
| [in] | color | the array containing the 3 component of the RGB color |
| void pcl::visualization::PCLPainter2D::setBackgroundColor | ( | const double | r, |
| const double | g, | ||
| const double | b | ||
| ) |
| void pcl::visualization::PCLPainter2D::setBrush | ( | vtkBrush * | brush | ) |
set/get methods for current working vtkBrush
| void pcl::visualization::PCLPainter2D::setBrushColor | ( | unsigned char | r, |
| unsigned char | g, | ||
| unsigned char | b, | ||
| unsigned char | a | ||
| ) |
| void pcl::visualization::PCLPainter2D::setPen | ( | vtkPen * | pen | ) |
| void pcl::visualization::PCLPainter2D::setPenColor | ( | unsigned char | r, |
| unsigned char | g, | ||
| unsigned char | b, | ||
| unsigned char | a | ||
| ) |
set/get methods for current working vtkPen
| void pcl::visualization::PCLPainter2D::setPenType | ( | int | type | ) |
| void pcl::visualization::PCLPainter2D::setPenWidth | ( | float | w | ) |
| void pcl::visualization::PCLPainter2D::setTransform | ( | vtkMatrix3x3 * | matrix | ) |
Create a translation matrix and concatenate it with the current transformation.
| [in] | matrix | the transformation matrix |
| void pcl::visualization::PCLPainter2D::setWindowSize | ( | int | w, |
| int | h | ||
| ) |
set/get method for the window size.
| [in] | w | the width of the window |
| [in] | h | the height of the window |
| void pcl::visualization::PCLPainter2D::spin | ( | ) |
spins (runs the event loop) the interactor indefinitely.
Same as display() - added to retain the similarity between other existing visualization classes
| 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.
| [in] | spin_time | - How long (in ms) should the visualization loop be allowed to run. |
| void pcl::visualization::PCLPainter2D::translatePen | ( | double | x, |
| double | y | ||
| ) |
Create a translation matrix and concatenate it with the current transformation.
| [in] | x | translation along X axis |
| [in] | y | translation along Y axis |
| pcl::visualization::PCLPainter2D::vtkTypeMacro | ( | PCLPainter2D | , |
| vtkContextItem | |||
| ) |