- stripTrianglesOutputs->InsertNextCell( 3 );
- stripTrianglesOutputs->InsertCellPoint(i*3+0);
- stripTrianglesOutputs->InsertCellPoint(i*3+1);
- stripTrianglesOutputs->InsertCellPoint(i*3+2);
- }
+ stripTrianglesOutputs->InsertNextCell( 3 );
+ stripTrianglesOutputs->InsertCellPoint(i*3+0);
+ stripTrianglesOutputs->InsertCellPoint(i*3+1);
+ stripTrianglesOutputs->InsertCellPoint(i*3+2);
+ } // for
+ // Create cell data
+ vtkUnsignedCharArray *cellDataOutputTriangle = vtkUnsignedCharArray::New();
+ cellDataOutputTriangle->SetNumberOfComponents(3);
+ cellDataOutputTriangle->SetNumberOfTuples(numberOfTriangles);
+ for (int i = 0; i < numberOfTriangles; i++)
+ {
+ rgb[0] = 000;
+ rgb[1] = 255;
+ rgb[2] = 255;
+ cellDataOutputTriangle->SetTuple(i, rgb);
+ } // for colors
+ pdTrianglesOutputs->GetCellData()->SetScalars(cellDataOutputTriangle);