<div class="gmail_quote">On Fri, Mar 5, 2010 at 8:47 AM, Sebastian Gatzka <span dir="ltr"><<a href="mailto:sebastian.gatzka@stud.tu-darmstadt.de">sebastian.gatzka@stud.tu-darmstadt.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">How is that
possible.<br>
I'm not understanding the syntax of the callback function.<br>
I'm afraid I can't alter it myself ...<br>
</font></font></div><div bgcolor="#ffffff" text="#000000"><font size="-1"><font face="Helvetica, Arial, sans-serif"><br></font></font></div></blockquote><div class="gmail_quote"><br></div><div class="gmail_quote">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.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote"> vtkIPWCallback():Plane(0),Actor(0),TextActor(0) {}</div><div class="gmail_quote"> vtkPlane *Plane;</div><div class="gmail_quote">
vtkActor *Actor;</div><div class="gmail_quote"> vtkTextActor *TextActor;</div><div class="gmail_quote"><br></div><div class="gmail_quote">... </div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_quote">
vtkSmartPointer<vtkIPWCallback> myCallback = </div><div class="gmail_quote"> vtkSmartPointer<vtkIPWCallback>::New();</div><div class="gmail_quote"> myCallback->Plane = plane;</div><div class="gmail_quote">
myCallback->Actor = actor;</div><div class="gmail_quote"> myCallback->TextActor = textActor;</div><div class="gmail_quote"><br></div></div></div>Does that help?</div><div class="gmail_quote"><br>David</div>