//=========================================================================
vtkGPortView::vtkGPortView()
- {
+ {
}
//=========================================================================
}
//=========================================================================
- void vtkGPortView::update(int command)
+ void vtkGPortView::update(int idObservable,int command)
{
- _objectActor->GetProperty()->SetColor(0.8,0.2,0.5);
- if(_model->getState()==HIGHLIGHTED)
- {
- _objectActor->GetProperty()->SetColor(0.8,0.2,0.5);
- }
- else
- {
- _objectActor->GetProperty()->SetColor(0.3,0.2,0.2);
- }
-
+ updateColors();
+
double xInic, yInic,zInic,xFin, yFin,zFin;
_model->getInicPoint(xInic,yInic,zInic);
_pts->SetPoint(1, xInic, yFin, zInic );
_pts->SetPoint(2, xFin, yFin, zFin );
_pts->SetPoint(3, xFin, yInic, zFin );
-
- //_baseView->GetRenderer()->Render();
- //_baseView->GetRenWin()->Render();
-
+
+ setRefreshWaiting();
}
//=========================================================================
_bboxMapper->SetInput(_pd);
_objectActor->SetMapper(_bboxMapper);
+ updateColors();
+
+
+ }
+
+ //=========================================================================
+
+ void vtkGPortView::updateColors()
+ {
_objectActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+ if(_state==HIGHLIGHTED)
+ {
+ _objectActor->GetProperty()->SetColor(0.8,0.2,0.5);
+ }
+ else
+ {
+ _objectActor->GetProperty()->SetColor(0.3,0.2,0.2);
+ }
}
//=========================================================================