Thanks for your response, Lu.<br><br>Yes, that's what I'm doing, but my problem is only with re-rendering the image. After updating the actor's position and orientation, the image doesn't update until I click on the screen to rotate or zoom, etc. It seems as though I'm missing the "update the screen" call. I have since found that if I call the Render() method of the renderWindowInteractor (actually a wxVTKRenderWindowInteractor) the actor disappears from the original position, but it still isn't redrawn until I click on the window. The only way I've found that updates the screen without clicking on it is to invoke a clicking event with the InvokeEvent() method. This is undesirable because then my screen rotates until I click on it. I've tried the following to get the screen to update:<br>
<br>pConeActor->SetPosition(5.0,5.0,0.0);// Set new position - for this sample, original position was [0.0, 0.0, 0.0]<br>m_pVTKWindow->Render();<br><br>This removes the actor from the original position, but doesn't draw it in it's new position until I click on the screen, as stated above.<br>
<br><br>pConeActor->SetPosition(5.0,5.0,0.0);<br>m_pVTKWindow->Render();<br>m_pVTKWindow->InvokeEvent(vtkCommand::ModifiedEvent, NULL);<br><br>The addition of the InvokeEvent call here makes no difference.<br><br>
<br>pConeActor->SetPosition(5.0,5.0,0.0);<br>
m_pVTKWindow->Render();<br>
m_pVTKWindow->Update();// I've tried this with Update first, then Render as well<br><br>The Update() call here makes no difference.<br><br><br>pConeActor->SetPosition(5.0,5.0,0.0);<br>
m_pVTKWindow->Render();<br>
m_pVTKWindow->InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);<br><br>This does make the image redraw, but it also makes it spin (as though you were pressing the left mouse button...). That makes the obvious next step:<br>
<br>pConeActor->SetPosition(5.0,5.0,0.0);<br>
m_pVTKWindow->Render();<br>
m_pVTKWindow->InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);<br>
m_pVTKWindow->InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);<br><br>But this doesn't do anything different than the first few attempts. I've been looking at the code that handles the LeftButtonPressEvent (vtkSubjectHelper::InvokeEvent in vtkObject.cxx) to try and figure out what part of that function makes the screen update, but so far I haven't been successful. Any help or advice is still appreciated!<br>
<br>Thanks,<br><br>Kerry<br><br><br><div class="gmail_quote">On Tue, May 20, 2008 at 8:14 PM, Yick Lu <<a href="mailto:jati.lue@gmail.com">jati.lue@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Maybe you can try "events"<br><br>The event handler function should be like this:<br><br>Typing Event Handler( eventArgs )<br>{<br>//check character at the beginning<br><br>pActor->Setpostion();//define new position<br>
pRenderer->Render();<br><br>}<br><br>The event is invoked as user type anything in the textbox. But make sure the inputed character is checked and valid.<br><font color="#888888"><br clear="all"><br>-- <br>Lu Yi<br>
</font></blockquote></div><br>