Skip to content

Commit

Permalink
[TEST] Add the test demo_text_simple.
Browse files Browse the repository at this point in the history
  • Loading branch information
frozar committed Dec 5, 2017
1 parent c3991a1 commit 8c05204
Show file tree
Hide file tree
Showing 2 changed files with 27 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 @@ -11,3 +11,6 @@ target_link_libraries(demo_shapes pcl_common pcl_io pcl_kdtree pcl_visualization

add_executable(demo_shapes_multiport test_shapes_multiport.cpp)
target_link_libraries(demo_shapes_multiport pcl_common pcl_io pcl_kdtree pcl_visualization)

add_executable(demo_text_simple text_simple.cpp)
target_link_libraries(demo_text_simple pcl_common pcl_visualization)
24 changes: 24 additions & 0 deletions visualization/test/text_simple.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <pcl/point_types.h>

#include <pcl/visualization/pcl_visualizer.h>

int
main (int argc, char** argv)
{
pcl::visualization::PCLVisualizer viz ("Visualizator");
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");
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");
viz.spin ();
viz.removeText3D ("id_following");
viz.spin ();
viz.removeText3D ("id_fixed");
viz.spin ();

return (0);
}

0 comments on commit 8c05204

Please sign in to comment.