[vtkusers] vtkCubeSource to vtkPolyData
tokalak at web.de
tokalak at web.de
Mon Jan 21 01:56:19 EST 2002
Hi all,
I do the following to color all sides of a vtkCubeSource
differently. But i doesnt function.
(prog-snippet in Java) :
vtkCubeSource cSource = new vtkCubeSource();
cSource.SetXLength(3);
cSource.SetYLength(3);
cSource.SetZLength(3);
vtkPolyData cube = cSource.GetOutput();
cube.BuildCells();
System.out.println(cube.Print());
cube.GetCellData().SetScalars(faceColors);
vtkPolyDataMapper cubeMapper = new vtkPolyDataMapper();
cubeMapper.SetScalarRange(0, 6.0);
cubeMapper.SetScalarModeToUseCellData();
........
The result is that all 6 sides are gray. The problem is that
"cube" has no cells and polys defined. How can i reach this ?
How can color all 6 sides of a cube differently ?
Thanks for any help
Greetings,
Ahmet
______________________________________________________________________________
Sichern Sie sich Ihre Chancen auf den Jackpot: Mit dem WEB.DE
Lottoservice bequem und sicher tippen: http://tippen2.web.de/?x=11
More information about the vtkusers
mailing list