Hi,<div><br></div><div>Are you following this example?</div><div><br></div><div><a href="http://vtkbioeng.cvs.sourceforge.net/viewvc/vtkbioeng/vtkbioeng/Testing/Cxx/TestCollisionDetection.cxx?revision=1.2&view=markup">http://vtkbioeng.cvs.sourceforge.net/viewvc/vtkbioeng/vtkbioeng/Testing/Cxx/TestCollisionDetection.cxx?revision=1.2&view=markup</a>
</div><div><br></div><div>If you want to manually transform the actors and maintain collision detection, use vtkTransform instead of vtkMatrix4x4:</div><div><br></div><div>vtkTransform *trans0 = vtkTransform::New();</div>
<div>vtkTransform *trans1 = vtkTransoform::New();</div><div><br></div><div><div>collide->SetTransform(0, trans0);</div><div>collide->SetTransform(1, trans1);</div></div><div>          </div><div>actor1->SetUserTransform(trans0);</div>
<div>actor2->SetUserTransform(trans1);</div><div><br></div><div>//then to transform your models:</div><div><br></div><div>trans0->Translate(10.0, 0.0, 0.0);</div><div>trans1->RotateX(20.0);</div><div><br></div><div>
// don't use:</div><div>actor1->AddPosition(10.0, 0.0, 0.0);</div><div>actor2->RotateX(20.0);</div><div><br></div><div>// or any or the other vtkProp3D transformation methods.</div><div>// as you found out, the interactors work fine with the user transforms or matrices.</div>
<div><br></div><div>hth</div><div><br></div><div>Goodwin</div><div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">On Sun, May 6, 2012 at 3:39 PM, M.M Mhiri <span dir="ltr"><<a href="mailto:mhiri_m@hotmail.com" target="_blank">mhiri_m@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
Hi all,<br>i have a problem to update a vtkActor Position after translation.<br><br>I'm using a collision Detection Filter, when i move my object with Trackball Actor style<br>the collision is ok, but when i move my object using (myActor->SetPosition)<br>
the collision is not detected.<br><br>I'm adding <br>           myActor->Modified();<br>            myActor->GetProperty()->Modified();<br>            myActor->Render(myRenderer, myMapper);<br><br><br><br>
Please Help !!<br><br>Thanks a lot<br>                                          </div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br>