MCPcopy Create free account
hub / github.com/OctoMap/octomap / playCameraPath

Method playCameraPath

octovis/src/ViewerWidget.cpp:238–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238void 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
252void ViewerWidget::stopCameraPath(int id) {
253 if(camera()->keyFrameInterpolator(id) && camera()->keyFrameInterpolator(id)->interpolationIsStarted()) {

Callers

nothing calls this directly

Calls 4

cameraFunction · 0.85
keyFrameInterpolatorMethod · 0.80
keyFrameTimeMethod · 0.80
startInterpolationMethod · 0.80

Tested by

no test coverage detected