File: text_simple_multiport.cpp

package info (click to toggle)
pcl 1.11.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 142,936 kB
  • sloc: cpp: 512,326; xml: 28,792; ansic: 13,656; python: 526; lisp: 93; makefile: 74; sh: 27
file content (30 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <pcl/point_types.h>

#include <pcl/visualization/pcl_visualizer.h>

int
main (int argc, char** argv)
{
  pcl::visualization::PCLVisualizer viz ("Visualizator");
  int leftPort (0);
  int rightPort (0);

  viz.createViewPort (0, 0, 0.5, 1, leftPort);
  viz.createViewPort (0.5, 0, 1, 1, rightPort);

  viz.addCoordinateSystem (1.0);

  viz.addText3D ("Following text", pcl::PointXYZ(0.0, 0.0, 0.0),
                 1.0, 1.0, 0.0, 0.0, "id_following", leftPort);
  viz.spin ();
  double orientation[3] = {0., 0., 0.};
  viz.addText3D ("Fixed text", pcl::PointXYZ(0.0, 0.0, 0.0), orientation,
                 1.0, 0.0, 1.0, 0.0, "id_fixed", rightPort);
  viz.spin ();
  viz.removeText3D ("id_following", leftPort);
  viz.spin ();
  viz.removeText3D ("id_fixed", rightPort);
  viz.spin ();

  return (0);
}