[vtkusers] SetExecuteMethod(void(* f)(void *), void * arg) ???

Jianlong Zhou zhou at isg.cs.uni-magdeburg.de
Fri Oct 5 09:16:13 EDT 2001


Hi,Axel,
Just made a blank letter to send.Sorry.
It should be done like this:
pointSource->SetExecuteMethod( ReadPoints, (void *) pointSource)

I think it will be ok.
Jianlong

> 
> I would like to use the vtkProgrammableSource class in a C++ program in the 
> same manner as in the TCL example: 
> ./contrib/examplesTcl/reconstructSurface.tcl.
> 
> Can anyone give me an example in C++ of the usage of SetExecuteMethod?
> 
> The function look like:
> void SetExecuteMethod(void(* f)(void *), void * arg)
> 
> I define a function : void ReadPoints ()
> then I use
> pointSource->SetExecuteMethod( ReadPoints, ??? )
> 
> 
> What is wrong? The compiler don't accept the first parameter.
> And the second I don't understand . It doesen't seem to be documented in 
> the manual or the VTK User's Guide. What is arg and why does the TCL 
> example use only one parameter? (Generally you can easily move from TCL to 
> C++ - but not in this case!).
> 
> 
> thanks for help
> Axel
> 
> 
> -----------------------------------------------------------------
> Axel Wendt
> Institute for Applied Photogrammetry and Geoinformatics
> Fachhochschule Oldenburg/Ostfriesland/Wilhelmshaven
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list