+ //Add the object to the objects list (only boxes and connectors)
+ objects.push_back(model);
+
+ }
+
+ //=========================================================================
+
+ void wxVtkSceneManager::createGOutputPort(BlackBoxOutputDescriptor *desc,GBlackBoxModel *blackBox)
+ {
+ int type = GPORT;
+
+ //Create the MVC Objects
+ GPortModel *model = (GPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
+ vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
+ GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
+
+ model->registerInBox(blackBox);
+ blackBox->addOutputPort(model);
+
+ //Prepares the initial model
+ double xx = 0;
+ double yy = 0;
+ double zz = 0;
+ blackBox->getInicPoint(xx,yy,zz);
+
+ xx++;
+ yy+=cantTemp;
+ model->setInicPoint(xx,yy,zz);
+
+ //Associates the view with the correspondent renderer and the model.
+ //(NOTE: Refresh is only made by the view)
+ view->setModel(model);
+ view->setBaseView(_baseView);
+ view->initVtkObjects();
+
+ //Associates the controller with the correspondent model and view
+ controller->setModelAndView(model,view);
+
+ //Register the controller of the new object
+ registerController((InteractorStyleMaracas*) controller);
+ }
+
+ //=========================================================================
+
+ void wxVtkSceneManager::createGInputPort(BlackBoxInputDescriptor *desc,GBlackBoxModel *blackBox)
+ {
+ int type = GPORT;
+
+ //Create the MVC Objects
+ GPortModel *model = (GPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
+ vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
+ GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
+
+ model->registerInBox(blackBox);
+ blackBox->addInputPort(model);
+
+
+ //Prepares the initial model
+ double xx = 0;
+ double yy = 0;
+ double zz = 0;
+ blackBox->getInicPoint(xx,yy,zz);
+
+ xx--;
+ yy+=cantTemp;
+ model->setInicPoint(xx,yy,zz);
+
+ //Associates the view with the correspondent renderer and the model.
+ //(NOTE: Refresh is only made by the view)
+ view->setModel(model);
+ view->setBaseView(_baseView);
+ view->initVtkObjects();
+
+ //Associates the controller with the correspondent model and view
+ controller->setModelAndView(model,view);
+
+ //Register the controller of the new object
+ registerController((InteractorStyleMaracas*) controller);