////////////////////////////////////////////////////////////////////////////////////////
| 163 | |
| 164 | ///////////////////////////////////////////////////////////////////////////////////////////// |
| 165 | void |
| 166 | pcl::visualization::Window::spinOnce (int time, bool force_redraw) |
| 167 | { |
| 168 | resetStoppedFlag (); |
| 169 | |
| 170 | if (time <= 0) |
| 171 | time = 1; |
| 172 | |
| 173 | if (force_redraw) |
| 174 | { |
| 175 | interactor_->Render (); |
| 176 | exit_main_loop_timer_callback_->right_timer_id = interactor_->CreateRepeatingTimer (time); |
| 177 | interactor_->Start (); |
| 178 | interactor_->DestroyTimer (exit_main_loop_timer_callback_->right_timer_id); |
| 179 | return; |
| 180 | } |
| 181 | |
| 182 | DO_EVERY(1.0/interactor_->GetDesiredUpdateRate (), |
| 183 | interactor_->Render (); |
| 184 | exit_main_loop_timer_callback_->right_timer_id = interactor_->CreateRepeatingTimer (time); |
| 185 | interactor_->Start (); |
| 186 | interactor_->DestroyTimer (exit_main_loop_timer_callback_->right_timer_id); |
| 187 | ); |
| 188 | } |
| 189 | |
| 190 | ///////////////////////////////////////////////////////////////////////////////////////////// |
| 191 | boost::signals2::connection |