+
+ int newId = _controllers.size();
+ controller->setId(newId);
+ _controllers[newId] = controller;
+ }
+
+ //=========================================================================
+
+ void wxVtkSceneManager::createGConnector(GPortModel* startPort)
+ {
+ int type = GCONNECTOR;
+
+ manualConnectorContourController* manContourControl = new manualConnectorContourController();
+ manualConnectorContourView* manContourView = new manualConnectorContourView();
+ manualContourModel* manContourModel = new manualContourModel();
+
+ GConnectorController* connectorcontroller = new GConnectorController();
+ GConnectorModel* connectorModel = new GConnectorModel();
+ GConnectorView* connectorView = new GConnectorView();
+ connectorModel->setGObjectType(type);
+
+ manContourModel->SetCloseContour(false);
+ connectorModel->setStartPort(startPort);
+
+ manContourView->SetModel( manContourModel );
+ manContourView->SetWxVtkBaseView( _baseView );
+ manContourView->SetRange( 0.5 );
+ manContourView->SetZ( 900 );
+
+ manContourView->SetColorNormalContour(0, 0, 1);
+ manContourView->SetColorEditContour(0.5, 0.5, 0.5);
+ manContourView->SetColorSelectContour(1, 0.8, 0);
+ manContourView->SetWidthLine(1);
+
+ manContourControl->SetModelView( manContourModel , manContourView );
+
+ manContourControl->CreateNewManualContour();
+
+ manContourView->RefreshContour();
+
+
+ double x,y,z;
+ connectorModel->getInicPoint(x,y,z);
+
+ manContourControl->SetState(1);
+ manContourModel->SetCloseContour(false);
+
+ manContourModel->AddPoint(x,y,z);
+ manContourView->AddPoint();
+
+ manContourModel->AddPoint(x,y,z);
+ manContourView->AddPoint();
+
+ int bak= manContourControl->GetNumberOfPointsManualContour() - 1;
+ manContourControl->_bakIdPoint=bak;
+ manContourView->Refresh();
+
+ manContourControl->SetMoving( false );
+
+ registerController((InteractorStyleMaracas*) connectorcontroller);
+
+ connectorcontroller->setManualContourController(manContourControl);
+ connectorModel->setManualContourModel(manContourModel);
+ connectorView->setManualContourView(manContourView);
+ connectorView->setModel(connectorModel);
+ connectorcontroller->setModelAndView(connectorModel,connectorView);
+
+ int newId = _controllers.size();
+ connectorcontroller->setId(newId);
+ _controllers[newId] = connectorcontroller;
+