MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / updateText

Method updateText

visualization/src/pcl_visualizer.cpp:2858–2881  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

2856
2857//////////////////////////////////////////////////////////////////////////////////////////
2858bool
2859pcl::visualization::PCLVisualizer::updateText (const std::string &text, int xpos, int ypos, const std::string &id)
2860{
2861 std::string tid;
2862 if (id.empty ())
2863 tid = text;
2864 else
2865 tid = id;
2866
2867 // Check to see if this ID entry already exists (has it been already added to the visualizer?)
2868 auto am_it = shape_actor_map_->find (tid);
2869 if (am_it == shape_actor_map_->end ())
2870 return (false);
2871
2872 // Retrieve the Actor
2873 vtkTextActor* actor = vtkTextActor::SafeDownCast (am_it->second);
2874 if (!actor)
2875 return (false);
2876
2877 actor->SetPosition (xpos, ypos);
2878 actor->SetInput (text.c_str ());
2879 actor->Modified ();
2880 return (true);
2881}
2882
2883//////////////////////////////////////////////////////////////////////////////////////////
2884bool

Callers 10

displaySettingsMethod · 0.80
displaySettingsMethod · 0.80
displayICPStateFunction · 0.80
mainFunction · 0.80
printTextFunction · 0.80
mainFunction · 0.80
printTextFunction · 0.80
mainFunction · 0.80
printTextFunction · 0.80
mainFunction · 0.80

Calls 4

emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
SetColorMethod · 0.45

Tested by

no test coverage detected