Go to the documentation of this file.00001
00002
00003 #include <iostream>
00004 #include <map>
00005 #include <vector>
00006 #include <pcl/visualization/pcl_painter2D.h>
00007
00008
00009 int main (int argc, char * argv [])
00010 {
00011 pcl::visualization::PCLPainter2D *painter = new pcl::visualization::PCLPainter2D();
00012
00013 int winw = 800, winh = 600;
00014 painter->setWindowSize (winw, winh);
00015 int xpos = 0;
00016 int r = winw;
00017 int R = 50;
00018 int inc = 5;
00019 int noc = winw/R;
00020
00021 while (1)
00022 {
00023
00024 for (int i = 0; i < noc; i++)
00025 {
00026 if (i % 2)
00027 painter->setBrushColor (0, 0, 0, 200);
00028 else
00029 painter->setBrushColor (255, 255, 255, 200);
00030
00031 int rad = r - i*R;
00032 if (rad < 0) { rad = winw + rad;}
00033
00034 painter->addCircle (winw/2, winh/2, rad);
00035 }
00036
00037 r -= inc;
00038 if (r < winw-R) r = winw + R;
00039
00040 painter->setBrushColor (255,0,0,100);
00041 painter->addRect ((xpos += inc) % winw, 100, 100, 100);
00042
00043
00044 painter->spinOnce ();
00045 painter->clearFigures ();
00046 }
00047
00048
00049 return 0;
00050 }