[vtkusers] RE: vtkCamera::SetViewPlaneNormal how to replace

Jeff Lee jeff at cdnorthamerica.com
Thu Jan 31 07:18:56 EST 2002


I do something like

    cam.SetFocalPoint(fp);
    cam.SetPosition(pos);
    cam.ComputeViewPlaneNormal();
    cam.SetViewUp(up);
    cam.OrthogonalizeViewUp();

-Jeff

Jaco Schieke wrote:

>I would like to do the same as Jan.  I have a plane (with a normal) at which I want the camera to look straight at.  Since
>SetViewPlaneNormal is now deprecated, how do one go about this?
>
>Thanks, and I hope it's third time lucky for this post.
>
>Jaco Schieke
>
>>>Hello,
>>>
>>I have some methods to switch the directions,
>>from where I see my objects:
>>
>>ViewFront:
>>  camera->SetViewUp(m_ViewUp);
>>  camera->SetViewPlaneNormal(m_ViewNormal);
>>  m_Renderer->ResetCamera();
>>
>>ViewBack:
>>  for(int i=0;i<3;i++) {
>>    view_normal[i] = -1 * m_ViewNormal[i];
>>  }
>>  camera->SetViewUp(m_ViewUp);
>>  camera->SetViewPlaneNormal(view_normal);
>>  m_Renderer->ResetCamera();
>>
>>ViewLeft
>>  vtkMath::Cross(m_ViewNormal,m_ViewUp,view_normal);
>>  camera->SetViewUp(m_ViewUp);
>>  camera->SetViewPlaneNormal(view_normal);
>>  m_Renderer->ResetCamera();
>>
>>and so on...
>>
>>But SetViewPlaneNormal() no longer work and I don't know
>>how to replace the old code.
>>
>>Jan
>>--
>>-----------------------
>>Jan Ehrhardt
>>mailto:ehrhardt at medinf.mu-luebeck.de
>>-----------------------
>>
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>





More information about the vtkusers mailing list