Skip to content

Commit

Permalink
[TEST] Add the test demo_text_simple_multiport.
Browse files Browse the repository at this point in the history
  • Loading branch information
frozar committed Dec 5, 2017
1 parent 8c05204 commit 6d14398
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions visualization/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ target_link_libraries(demo_shapes_multiport pcl_common pcl_io pcl_kdtree pcl_vis

add_executable(demo_text_simple text_simple.cpp)
target_link_libraries(demo_text_simple pcl_common pcl_visualization)

add_executable(demo_text_simple_multiport text_simple_multiport.cpp)
target_link_libraries(demo_text_simple_multiport pcl_common pcl_visualization)
30 changes: 30 additions & 0 deletions visualization/test/text_simple_multiport.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,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);
}

0 comments on commit 6d14398

Please sign in to comment.