+ void vtkGBoxView::updateColorsPorts()
+ {
+ // Input ports
+ float rgb[3];
+ vtkGPortView *portView;
+ GBoxModel *boxModel = (GBoxModel*)_model;
+ int numberOfTriangles = boxModel->getNumInputPorts();
+ for (int i=0 ; i<numberOfTriangles; i++)
+ {
+ portView = _inputsG[i];
+ portView->getColors(rgb);
+ rgb[0]=rgb[0]*255;
+ rgb[1]=rgb[1]*255;
+ rgb[2]=rgb[2]*255;
+ _cellDataInputTriangles->SetTuple(i, rgb);
+ } // for
+
+ numberOfTriangles = boxModel->getNumOutputPorts();
+ for (int i=0 ; i<numberOfTriangles; i++)
+ {
+ portView = _outputsG[i];
+ portView->getColors(rgb);
+ rgb[0]=rgb[0]*255;
+ rgb[1]=rgb[1]*255;
+ rgb[2]=rgb[2]*255;
+ _cellDataOutputTriangles->SetTuple(i, rgb);
+ } // for
+ }