[vtkusers] vtkCamera

David Català david.catala at datapixel.com
Mon Dec 1 03:31:49 EST 2003


Hi Jean-Baptiste,
You can get the center of A and setfocal point of the camera with this
center.

  A->GetActor()->GetBounds(bounds);

 center[0] = (bounds[0] + bounds[1])/2.0;
 center[1] = (bounds[2] + bounds[3])/2.0;
 center[2] = (bounds[4] + bounds[5])/2.0;

  vtkCamera* camera = GetRenderer()->GetActiveCamera();
  camera->SetFocalPoint(center);

  -----Mensaje original-----
  De: vtkusers-admin at vtk.org [mailto:vtkusers-admin at vtk.org]En nombre de
Jean-Baptiste Estival
  Enviado el: divendres, 28 / novembre / 2003 14:21
  Para: vtkusers at vtk.org
  Asunto: [vtkusers] vtkCamera


  Hello,
  I have some problem with positionning my camera.
  My cam may point on the center of  object A. so the object A must not move
in the render view
  but when i do ResetCamera, all the view moves and only object B really
moves.
  Can someone help me ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031201/1dec6f1b/attachment.htm>


More information about the vtkusers mailing list