[vtkusers] Mixing C++ and Tcl/Tk Code in vtk application
Daniel A. Mezentsev
dan at barrt.ru
Mon Apr 29 21:40:53 EDT 2002
Hi, All!
I'm write some classes not derivative from vtk classes. I'm wrapped my
own classes into Tcl/Tk script, but
without standard vtk wrapper using. The following code is very slowly.
AtomCluster cluster # this is my class
cluster Load "water"
vtkStructuredPoints vol
vol SetDimensions 101 101 101
vol SetSpacing 0.1 0.1 0.1
vol SetOrigin -5 -5 -5
vtkFloatArray potential
for {set i 0} {$i < [vol GetNumberOfPoints]} {incr i} {
set r [vol GetPoint $i]
set phi [cluster NuclerPotential [lindex $r 0] [lindex $r 1] [lindex
$r 2]]
potential InsertNextValue $phi
}
. . . .
I want to use the following code :
AtomCluster cluster
cluster Load "water"
vtkStructuredPoints vol
vol SetDimensions 101 101 101
vol SetSpacing 0.1 0.1 0.1
vol SetOrigin -5 -5 -5
cluster CalculateNuclearPotential vol
but I don't know how to obtain access to the object corresponding to
the vtkStructuredPoints instance (vol in my case) from C/C++ programm
(from cluster class).
Any suggestions ?
With respect
Daniel.
More information about the vtkusers
mailing list