/////////////////////////////////////////////////////////////////////////////////////
| 2856 | |
| 2857 | ////////////////////////////////////////////////////////////////////////////////////////// |
| 2858 | bool |
| 2859 | pcl::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 | ////////////////////////////////////////////////////////////////////////////////////////// |
| 2884 | bool |
no test coverage detected