"I would like to have a pointer to the parent class (CSdiogl2View)."  You can not have pointers to classes, but rather instances of classes.  If it is a static method it is not associated with any instance of the class.  If you want it to have access to an instance of CSdiogl2View, you could keep a static CSdiogl2View* around in the class.
<br><br>chase<br><br><div><span class="gmail_quote">On 3/22/06, <b class="gmail_sendername">Jessica Weiner</b> &lt;<a href="mailto:suspended@gmail.com">suspended@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am capturing left mouse click events in my vtk scene. Whenever the left<br>mouse button is released I want to change the vtk scene somehow. My event<br>handler method (myKeyPressCallback) is a static method and therefor it does
<br>not have access to the variables of the class it belongs to. I would like to<br>have a pointer to the parent class (CSdiogl2View) inside the event handler<br>which has all the actors. How can this be done? I have written my code like
<br>this:<br><br><br>vtkCallbackCommand * keypressCB = vtkCallbackCommand::New();<br> keypressCB-&gt;SetCallback(&amp;CSdiogl2View::myKeyPressCallback);<br><br>style = vtkInteractorStyleTrackballActor::New();<br>style-&gt;AddObserver(vtkCommand::LeftButtonReleaseEvent,keypressCB);
<br>iren-&gt;SetInteractorStyle(style);<br><br>Thanks.<br>Jess<br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>