[vtkusers] SetExecuteMethod(void(* f)(void *), void * arg) ???
Jianlong Zhou
zhou at isg.cs.uni-magdeburg.de
Fri Oct 5 09:30:54 EDT 2001
You should define function like this,
void ReadPoints(void *arg)
Good luck,
Jianlong
> Thanks Jianlong,
>
> I still have a problem with
> the ReadPoints function.
>
> I define it like:
> void* ReadPoints();
>
> but the compiler don't accept. He says, he couldn't convert from
> 'void *(void)' to 'void (__cdecl *)(void *)
>
> do you know the solution?
>
> axel
>
> At 15:16 05.10.2001 +0200, you wrote:
> >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
>
More information about the vtkusers
mailing list