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

Jaco Schieke schieke at cae.wisc.edu
Wed Jan 30 21:19:01 EST 2002


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
> -----------------------





More information about the vtkusers mailing list