<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Dear all,</div><div><br></div>I'm very sorry.<div><br></div><div>There is no problem with <span style="color: rgb(68, 68, 68); font-size: 15px; line-height: 21.2999992370605px; background-color: rgb(255, 255, 255);">vtkInteractorStyleTrackballActor class.</span></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;"><br></span></font></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;">My problem was caused by applying vtkTransform to new actors.</span></font></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;"><br></span></font></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;">It was resolved.</span></font></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;"><br></span></font></div><div><font color="#444444"><span style="font-size: 15px; line-height: 21.2999992370605px;">Sorry again.<br></span></font><br><div><hr id="stopSpelling">From: mnour.ai@hotmail.com<br>To: vtkusers@vtk.org<br>Date: Sat, 21 Mar 2015 13:49:34 +0000<br>Subject: [vtkusers] vtkInteractorStyleTrackballActor behavior<br><br>


<div dir="ltr">

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr"><span style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">Hi all,</span><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br style="line-height:21.2999992370605px;"></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">I am using MS visual studio 2008 and vtk 5.10</div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br style="line-height:21.2999992370605px;"></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">I have rendering window and set its InteractorStyle to vtkInteractorStyleTrackballActor:</div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">vtkRenderWindowInteractor* </span>iren = vtkRenderWindowInteractor::New();</div><div style="line-height:21.2999992370605px;">iren->SetRenderWindow(renWin);</div><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">vtkInteractorStyleTrackballActor</span>* style = <span style="line-height:21.2999992370605px;">vtkInteractorStyleTrackballActor</span>::New();</div><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">iren->SetInteractorStyle(style);</span></div><div style="line-height:21.2999992370605px;">iren->Initialize();</div><div style="line-height:21.2999992370605px;"><div style="line-height:21.2999992370605px;">ren->ResetCamera();</div><div style="line-height:21.2999992370605px;">renWin->Render();</div></div></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">If my render window initialized with some actors, <span style="line-height:21.2999992370605px;">mouse interaction</span> act like expected.</div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br style="line-height:21.2999992370605px;"></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">If I add other actors, old actors mouse interaction still act as expected but added actors <span style="line-height:21.2999992370605px;">mouse interaction look</span> like <span style="line-height:21.2999992370605px;">vtkInteractorStyleTrackballCamera (maybe by default):</span></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><span style="line-height:21.2999992370605px;"><div style="line-height:21.2999992370605px;">vtkActor* actorCopy = vtkActor::New();</div><div style="line-height:21.2999992370605px;">actorCopy->SetMapper(mapperCopy);</div><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">actorCopy->SetPosition(newPos[0], newPos[1], newPos[2]);</span></div><div style="line-height:21.2999992370605px;">actorCopy->SetUserTransform(trn);</div><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">ren->AddActor(actorCopy);</span></div><div style="line-height:21.2999992370605px;"><span style="line-height:21.2999992370605px;">renWin->Render();</span></div></span></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br style="line-height:21.2999992370605px;"></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">What should I do to make new actors mouse interaction look like <span style="line-height:21.2999992370605px;">vtkInteractorStyleTrackballActor</span><span style="line-height:21.2999992370605px;">?</span></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);"><br style="line-height:21.2999992370605px;"></div><div style="line-height:21.2999992370605px;color:rgb(68, 68, 68);font-size:15px;background-color:rgb(255, 255, 255);">Thank you very much</div></div>
                                          </div>
<br>_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers</div></div>                                       </div></body>
</html>