_baseView->GetRenderer()->GradientBackgroundOff();
_baseView->Refresh();
+ // Actos Port_Text
_textActor = vtkTextActor3D::New();
- _textActor->SetPosition( 100 , 100 , 900 );
- _textActor->SetInput( "Ups EED" );
+ _textActor->SetPosition( -9999 , -9999 , 900 );
+ _textActor->SetInput( "<void>" );
+ _textActor->GetTextProperty()->SetFontSize(80);
+ _textActor->GetTextProperty()->BoldOn();
+ _textActor->GetTextProperty()->SetColor(PORTTEXT_NH_R,PORTTEXT_NH_G,PORTTEXT_NH_B);
+
_baseView->GetRenderer()->AddActor( _textActor );
+
+ // Actor Fill_Port_Text
+
+ //------------
+ double xInic = 0;
+ double yInic = 0;
+ double zInic = 900;
+ vtkCellArray *strip = vtkCellArray::New();
+ vtkPolyData *pdFill = vtkPolyData::New();
+ _fillObjectActor = vtkActor::New();
+ _fillPolyMapper = vtkPolyDataMapper::New();
+ _pts = vtkPoints::New();
+
+ _pts->SetNumberOfPoints(4);
+ _pts->SetPoint(0, xInic , yInic , zInic );
+ _pts->SetPoint(1, xInic+50 , yInic , zInic );
+ _pts->SetPoint(2, xInic+50 , yInic+50 , zInic );
+ _pts->SetPoint(3, xInic , yInic+50 , zInic );
+ 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);
+ _fillObjectActor->GetProperty()->SetColor(PORTFILL_NH_R,PORTFILL_NH_G,PORTFILL_NH_B);
+ _fillPolyMapper->Modified();
+
+ _baseView->GetRenderer()->AddActor( _fillObjectActor );
}
//=========================================================================
model->notifyObservers(_idManager);
- int newId = addObjectController(controller);
+ addObjectController(controller);
return (GPortController*)controller;
}
} // if GBLACKBOX
if(type==GPORT)
{
+ // PortText
okPortMessage = true;
_textActor->SetInput( desc->getStatusText().c_str() );
- _textActor->SetScale(1);
-//ups1 EED
- _textActor->SetPosition( px ,py , pz+1 );
+ _textActor->SetScale(0.1);
+ _textActor->SetPosition( px-25 ,py , pz+2 );
+
+ // FillPortText
+ px=px-35;
+ _pts->SetPoint(0, px , py , 900+1 );
+ _pts->SetPoint(1, px+100, py , 900+1 );
+ _pts->SetPoint(2, px+100, py+10 , 900+1 );
+ _pts->SetPoint(3, px , py+10 , 900+1 );
+ _fillPolyMapper->Modified();
+
} // if GPORT
} // for controllers it
{
int ID = cont->getId();
mapSelected[ID]=cont;
- }
-
+ }
}
}
return mapSelected;
}
- for(int i = 0 ;i<connections.size();i++)
+ for(int i = 0 ;i<(int)connections.size();i++)
{
int objId = connections[i];
GObjectController *cont = objectsMap[objId];