[vtkusers] code in c++
marisa aurelio
asiram00 at hotmail.com
Fri Feb 7 04:16:35 EST 2003
Hi vtk users:
I have this code in TCL. Can anyone explain me how to convert to c++??
Thanks.
Marisa
--------
vtkProgrammableSource pointSource
pointSource SetExecuteMethod readPoints
proc readPoints {} {
global VTK_DATA_ROOT
set output [pointSource GetPolyDataOutput]
vtkPoints points
$output SetPoints points
set file [open "$VTK_DATA_ROOT/Data/cactus.3337.pts" r]
while { [gets $file line] != -1 } {
scan $line "%s" firstToken
if { $firstToken == "p" } {
scan $line "%s %f %f %f" firstToken x y z
points InsertNextPoint $x $y $z
}
}
points Delete; #okay, reference counting
}
-------------
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the vtkusers
mailing list