void nurbs_plugin::create() { if(widget) return; if(mesh()->name == "empty"){ document()->deleteModel(document()->getModel("empty")); } drawArea()->setRenderer( mesh(), "Transparent"); drawArea()->camera()->setType(qglviewer::Camera::PERSPECTIVE); entireMesh = (SurfaceMeshModel*)document()->selectedModel(); entirePoints = entireMesh->vertex_property<Vector3>("v:point"); for(int i = 0; i < 10; i++) randColors.push_back(starlab::qRandomColor()); loadGroupsFromOBJ(); m = mesh(); points = m->vertex_property<Vector3>("v:point"); graph = new Structure::Graph; ModePluginDockWidget * dockwidget = new ModePluginDockWidget("NURBS plugin", mainWindow()); widget = new NURBSTools(this); dockwidget->setWidget(widget); dockwidget->setWindowTitle(widget->windowTitle()); mainWindow()->addDockWidget(Qt::RightDockWidgetArea,dockwidget); widget->fillList(); mainWindow()->showMaximized(); //buildSamples(); }
void geometry_morph::create() { if(!widget) { ModePluginDockWidget * dockwidget = new ModePluginDockWidget(mainWindow()); widget = new geometry_morph_widget(this); dockwidget->setWidget(widget); dockwidget->setWindowTitle(widget->windowTitle()); mainWindow()->addDockWidget(Qt::RightDockWidgetArea,dockwidget); } }
void surfacemesh_mode_arapdeform::create() { if(!widget) { ModePluginDockWidget * dockwidget = new ModePluginDockWidget("As-rigid-as-possible deformation", mainWindow()); widget = new arap_widget(this); dockwidget->setWidget(widget); mainWindow()->addDockWidget(Qt::RightDockWidgetArea,dockwidget); } update(); }