| 236 | } |
| 237 | |
| 238 | void ViewerWidget::playCameraPath(int id, int start_frame) { |
| 239 | qglviewer::KeyFrameInterpolator *kfi = camera()->keyFrameInterpolator(id); |
| 240 | if(kfi && !kfi->interpolationIsStarted() && start_frame >= 0 && start_frame < kfi->numberOfKeyFrames()) { |
| 241 | m_current_camera_path = id; |
| 242 | m_current_camera_frame = start_frame; |
| 243 | kfi->setInterpolationTime(kfi->keyFrameTime(start_frame)); |
| 244 | std::cout << "Playing path of length " << kfi->numberOfKeyFrames() << ", start time " << kfi->keyFrameTime(start_frame) << std::endl; |
| 245 | connect(kfi, SIGNAL(interpolated()), this, SLOT(update())); |
| 246 | connect(kfi, SIGNAL(interpolated()), this, SLOT(cameraPathInterpolated())); |
| 247 | connect(kfi, SIGNAL(endReached()), this, SLOT(cameraPathFinished())); |
| 248 | kfi->startInterpolation(); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | void ViewerWidget::stopCameraPath(int id) { |
| 253 | if(camera()->keyFrameInterpolator(id) && camera()->keyFrameInterpolator(id)->interpolationIsStarted()) { |
nothing calls this directly
no test coverage detected