+ _borderPolyMapper->SetInput(_pd);
+ _borderObjectActor->SetMapper(_borderPolyMapper);
+ _borderPolyMapper->Modified();
+
+
+ ///************************* FILL *************************
+
+ vtkCellArray *strip = vtkCellArray::New();
+ vtkPolyData *pdFill = vtkPolyData::New();
+ _fillPolyMapper = vtkPolyDataMapper::New();
+ _fillObjectActor = vtkActor::New();
+
+ // RaC In the actual version, zInic=zFin=900
+
+ strip->InsertNextCell(5);
+ strip->InsertCellPoint(0);
+ strip->InsertCellPoint(1);
+ strip->InsertCellPoint(2);
+ strip->InsertCellPoint(0);
+ strip->InsertCellPoint(3);
+
+ pdFill->SetPoints( _pts );
+ pdFill->SetStrips( strip );
+
+ _fillPolyMapper->SetInput(pdFill);
+ _fillObjectActor->SetMapper(_fillPolyMapper);
+ _fillPolyMapper->Modified();
+
+ ///************************* FILL *************************
+
+ //------------
+
+ _boxTextActor = vtkTextActor3D::New();
+ _boxTextActor->GetTextProperty()->SetFontSize(80);
+ _boxTextActor->GetTextProperty()->BoldOn();
+
+ //------------
+
+ updatePositionTextActor( xInic, yInic, zInic);
+ }
+
+ //=========================================================================
+
+ void vtkGBlackBoxView::addVtkActors()//virtual
+ {
+ _baseView->GetRenderer()->AddActor(_borderObjectActor);
+ _baseView->GetRenderer()->AddActor(_boxTextActor);
+ vtkGObjectView::addVtkActors();
+ }
+
+ //=========================================================================
+
+ void vtkGBlackBoxView::removeVtkActors()//virtual
+ {
+ _baseView->GetRenderer()->RemoveActor(_borderObjectActor);
+ _baseView->GetRenderer()->RemoveActor(_boxTextActor);
+ vtkGObjectView::removeVtkActors();
+ }
+
+ //=========================================================================
+
+ void vtkGBlackBoxView::updatePositionTextActor(double xInic, double yInic, double zInic)
+ {
+ std::string temp = _model->getBBTKType();
+ temp+=":";
+ temp+=_model->getBBTKName();
+ _boxTextActor->SetInput(temp.c_str());
+ _boxTextActor->SetPosition(xInic+4,yInic-7,zInic);
+ _boxTextActor->SetScale(0.05,0.05,1);
+ }
+
+ //=========================================================================
+
+ void vtkGBlackBoxView::updateColors()
+ {
+ _fillObjectActor->GetProperty()->SetAmbient(0.6);
+
+ if(_state==NOTHING_HAPPENS)
+ {
+ _borderObjectActor->GetProperty()->SetLineWidth(1);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_NH_R,BOXFILL_NH_G,BOXFILL_NH_B);
+ _boxTextActor->GetTextProperty()->SetColor(BOXTEXT_NH_R,BOXTEXT_NH_G,BOXTEXT_NH_B);
+
+ GBlackBoxModel *bbmodel = (GBlackBoxModel*)_model;
+ if(bbmodel->isExecutable())
+ {
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,0.9,BOXBORDER_HIGHLIGHTED_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_NH_R,0.9,BOXFILL_HIGHLIGHTED_B);
+ }
+
+ }
+ else if(_state==HIGHLIGHTED)
+ {
+ _borderObjectActor->GetProperty()->SetLineWidth(2);