[vtkusers] Information during callback / vtkImplicitPlaneWidget2
    David Doria 
    daviddoria+vtk at gmail.com
       
    Fri Mar  5 08:52:37 EST 2010
    
    
  
On Fri, Mar 5, 2010 at 8:47 AM, Sebastian Gatzka <
sebastian.gatzka at stud.tu-darmstadt.de> wrote:
>  How is that possible.
> I'm not understanding the syntax of the callback function.
> I'm afraid I can't alter it myself ...
>
>
The idea is that you just need to give the callback function access to the
thing you want to change. Everything is a pointer in VTK, so if you give the
callback function a pointer to something, you can then modify the object
that the pointer points to from the callback function and it modifies the
actual object.
    vtkIPWCallback():Plane(0),Actor(0),TextActor(0) {}
    vtkPlane *Plane;
    vtkActor *Actor;
    vtkTextActor *TextActor;
...
  vtkSmartPointer<vtkIPWCallback> myCallback =
      vtkSmartPointer<vtkIPWCallback>::New();
  myCallback->Plane = plane;
  myCallback->Actor = actor;
  myCallback->TextActor = textActor;
Does that help?
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100305/eff50aca/attachment.htm>
    
    
More information about the vtkusers
mailing list