Dear all,<br><br>I'm using vtkCamera and vtkRenderer to convert points from world coordinates to display coordinates. <br><br>I have two actors. I add these actors to my renderer one by one like follows.<br><b><br>A renderer->SetActiveCamera(camera1);<br>
renderer->AddActor(actor1);<br> renderer->AddActor(actor2);<br> camera2 = renderer->GetActiveCamera();<br>//-------------------------------------------------------------<br>B renderer->SetActiveCamera(camera1);<br>
renderer->AddActor(actor1);<br> camera2 = renderer->GetActiveCamera();<br> renderer->AddActor(actor2);</b><br><br>So, are the details of camera2 in case A and case B same? In my app, it is not. Seems the camera always catch the center of 3D space and set its focal point to it.<br>
<br>I am trying to make sure the camera always focus on actor1 even there are more actors added to the renderer. I guess the code should be like this,<br><br><b>renderer->AddActor(actor1);<br>camera = renderer->GetActiveCamer();<br>
renderer->AddActor(actor2);<br>renderer->SetActiveCamera(camera);</b><br><br>Am I right on this?<br><br>Thank you very much.<br><br>Best wishes<br>Long<br>