[vtkusers] Displaying Points
Karin Faulhaber
faulhabe at ipf.uni-karlsruhe.de
Tue Nov 7 11:35:34 EST 2000
Hi,
I'm "playing" with vtk-java to learn it, because I don't have the
tutorial yet. What I can't figure out is: how do I create a point with
certain coordinates and display it? Something like vtkSphereSource, but
vtkPointSource doesn't let me choose my own coordinates. I tried the
following:
vtkPoints points2 = new vtkPoints();
//points2.SetPoint(1, 3.0,2.0,1.0);
points2.InsertPoint(0, 1.0,2.0,1.0);
points2.InsertPoint(1, 1.0,0.5,0.5);
points2.InsertPoint(2, 0.5,0.5,0.5);
vtkPolyData pointData = new vtkPolyData();
pointData.SetPoints(points2);
vtkPolyDataMapper map5 = new vtkPolyDataMapper();
map5.SetInput(pointData);
vtkActor aPoints2 = new vtkActor();
aPoints2.SetMapper(map5);
ren3.AddActor(aPoints2);
Is this supposed to work? (It doesn't, I can't see anything, but in this
case it's my problem.)
Thanks for any help!
Karin
More information about the vtkusers
mailing list