///// ******* TO ERASE *******
//JUST TO TEST
- //
-
-
-
+ //
+ /*
vtkConeSource *cone = vtkConeSource::New();
cone->SetResolution(10);
vtkPoints *_pts = vtkPoints::New();
_pts->SetNumberOfPoints(4);
- _pts->SetPoint(0, -1 , -1 , 0 );
- _pts->SetPoint(1, 1 , -1 , 0 );
- _pts->SetPoint(2, 1 , 1 , 0 );
- _pts->SetPoint(3, -1 , 1 , 0 );
+ _pts->SetPoint(0, -100 , -100 , 900 );
+ _pts->SetPoint(1, 100 , -100 , 900 );
+ _pts->SetPoint(2, 100 , 100 , 900 );
+ _pts->SetPoint(3, -100 , 100 , 900 );
vtkCellArray *lines = vtkCellArray::New();
lines->InsertNextCell(5);
getRenderer()->AddActor(_pointVtkActor);
- // Create a vector text
- vtkVectorText* vecText = vtkVectorText::New();
- vecText->SetText("vtkVectorText");
-
- vtkPolyDataMapper* txtMapper = vtkPolyDataMapper::New();
- txtMapper->SetInputConnection( vecText->GetOutputPort());
- vtkActor* txtActor = vtkActor::New();
- txtActor->SetMapper(txtMapper);
- //getRenderer()->AddActor(txtActor);
+
+
+ vtkPoints *_pts2 = vtkPoints::New();
+ _pts2->SetNumberOfPoints(4);
+
+ _pts2->SetPoint(0, -105 , -100 , -50 );
+ _pts2->SetPoint(1, 100 , -100 , -50 );
+ _pts2->SetPoint(2, 100 , 100 , -50 );
+ _pts2->SetPoint(3, -105 , 100 , -50 );
+
+ vtkCellArray *lines2 = vtkCellArray::New();
+ lines2->InsertNextCell(5);
+ lines2->InsertCellPoint(0);
+ lines2->InsertCellPoint(1);
+ lines2->InsertCellPoint(2);
+ lines2->InsertCellPoint(3);
+ lines2->InsertCellPoint(0);
+
+ vtkPolyData *_pd2 = vtkPolyData::New();
+ _pd2->SetPoints( _pts2 );
+ _pd2->SetLines( lines2 );
+
+ vtkActor *_pointVtkActor2 = vtkActor::New();
+ vtkPolyDataMapper* _bboxMapper2 = vtkPolyDataMapper::New();
+
+ _bboxMapper2->SetInput(_pd2);
+ _pointVtkActor2->SetMapper(_bboxMapper2);
+
+ getRenderer()->AddActor(_pointVtkActor2);
+
+ */
// ******* TO ERASE *******
/////////////////////
}
}
+
//=========================================================================
void wxVtkSceneManager::disconnectDrop()
{
iren->SetInteractorStyle(interactorstylebaseview);
interactorstylebaseview->SetwxVtkBaseView(_baseView);
+ double posCamera[3];
+ _baseView->GetRenderer()->GetActiveCamera()->ParallelProjectionOn();
+ _baseView->GetRenderer()->GetActiveCamera()->SetPosition(0,0,1000);
+ _baseView->GetRenderer()->GetActiveCamera()->GetPosition(posCamera);
+ _baseView->GetRenderer()->ResetCamera();
+ _baseView->GetRenderer()->ResetCameraClippingRange();
+
+
_baseView->GetRenderer()->SetBackground(0.9,0.9,0.9);
_baseView->GetRenderer()->GradientBackgroundOff();
_baseView->Refresh();
-
}
//=========================================================================
double yy = windowHeight-y;
//z value is not important yet, because it is only used a parallel projection
- double zz = 0;
+ double zz = 900;
_baseView->TransCoordScreenToWorld(xx,yy,zz);
model->setInicPoint(xx,yy,zz);
int cantObjects = _objects.size();
cantObjects++;
std::stringstream stream;
- stream << "Object " << cantObjects;
+ stream << "Box " << cantObjects;
std::string arraystring = stream.str();
model->setBBTKName(arraystring);
void wxVtkSceneManager::createGConnector(GPortModel* startPort)
{
manualContourControler* manContourControl = new manualContourControler();
- manualViewContour* manViewerContour = new manualViewContour();
+ GConnectorView* manViewerContour = new GConnectorView();
manualContourModel* manContourModel = new manualContourModel();
manContourControl->SetModelView( manContourModel , manViewerContour );
manContourControl->Configure();
int i,sizeLstPoints = manContourModel->GetSizeLstPoints();
+ //std::cout<<"RaC wxVtkSceneManager::createGConnector "<<this<<" size:"<<sizeLstPoints<<std::endl;
for ( i=0; i<sizeLstPoints; i++ )
{
manViewerContour->AddPoint();
if(_objects[i]->getGObjectType() == GBLACKBOX)
{
- GPortModel* startInputPort=((GBlackBoxModel*)_objects[i])->getStartInputPort();
- createGConnector(startInputPort);
+ GPortModel* startOutputPort=((GBlackBoxModel*)_objects[i])->getStartOutputPort();
+ createGConnector(startOutputPort);
}
else