- vtkactor->GetProperty()->SetColor( r,g,b );
- vtkactor->GetProperty()->SetLineWidth( 0.5 );
+ if (bbGetInputColourLaw()==3) // color for each point
+ {
+ // Setup the colors array
+ vtkUnsignedCharArray *colors = vtkUnsignedCharArray::New();
+ colors->SetNumberOfComponents(3);
+ colors->SetName("Colors");
+// colors->SetName("vertex color");
+ int iPoint,pointSize=iGeneral+numPoints;
+
+
+ for (iPoint=iGeneral; iPoint<pointSize; iPoint++)
+ {
+ r = bbGetInputColour()[0+iPoint*3]*255.0;
+ g = bbGetInputColour()[1+iPoint*3]*255.0;
+ b = bbGetInputColour()[2+iPoint*3]*255.0;
+ //colors->SetTuple3(iPoint,r,g,b);
+ colors->InsertNextTuple3(r,g,b);
+ }
+ polydata->GetCellData()->SetScalars(colors);
+ polydata->Modified();
+
+ } // Law 3 color for each point
+
+ vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );