void MiniMap::setCurrentScene() { mEditorView = mWindow->getCurrentTab(); if (mEditorView == NULL) { return; } EditorViewScene *editorViewScene = static_cast<EditorViewScene *>(mEditorView->scene()); if (editorViewScene->mainWindow() != NULL) { setScene(editorViewScene); // can affect zoom - need to change it if we make another desision about it connect(editorViewScene, SIGNAL(sceneRectChanged(QRectF)), this, SLOT(showScene())); } }
void MiniMap::setScene(QGraphicsScene *scene) { QGraphicsView::setScene(scene); showScene(); }
int main( int argc, char* argv[] ) { showScene( argc, argv ); return 1; }
void pairwiseAlign ( vector<PointCloud, Eigen::aligned_allocator<PointCloud> > data, vector<pcl::CorrespondencesPtr> correspondencesdata, vector<PointCloud, Eigen::aligned_allocator<PointCloud> > key3data, PointCloud &output, vector<PointCloud, Eigen::aligned_allocator<PointCloud> > &out_data, vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > & matrix_buffer, bool initial, double threshold) { cout << "pariwise registration ..." << endl; Eigen::Matrix4f matrix_initial; Eigen::Matrix4f matrix; matrix_initial << 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1; output = data[0]; if (initial == 1) { p->addPointCloud (data[0].makeShared (),"3"); p->spinOnce (); } matrix_buffer.push_back (matrix_initial); if (SAVE_EACH_PCD) { pcl::io::savePCDFile ("pcd/p1.pcd", data[0], true); } out_data.push_back (data[0]); for (unsigned int i = 1; i < data.size (); i++) { PointCloudPtr temp (new PointCloud ()); if (initial) cout << "# " << i << "->" << i + 1 << ":" << endl; matrix = twostepAlign (data[i], data[i - 1], key3data[i], key3data[i - 1], correspondencesdata[i - 1], matrix_initial, *temp, initial, threshold); if (SAVE_EACH_PCD) { string savename; stringstream strStream; strStream << i + 1; savename = "pcd/p" + strStream.str () + ".pcd"; pcl::io::savePCDFile (savename.c_str (), *temp, true); } out_data.push_back (*temp); // for global align if (matrix_buffer.size () < i + 1) matrix_buffer.push_back (matrix); else matrix_buffer[i] = matrix * matrix_buffer[i]; matrix_initial = matrix; output = output + *temp; if (initial==1) showScene (*p, matrix_buffer[i], output); } }