[vtkusers] How to set a camera's azimuth and elevation?

Hua-Mei Chen huameichen0523 at gmail.com
Wed Oct 1 06:17:56 EDT 2008


Xiaofeng and all,

I am sorry that the question I raised was not clear. Basically what I wanted to achieve was to reset the camera's original position. The methods vtkCamera::Azimuth() , vtkCamera::Elevation() and vtkCamera::Roll() won't do the job unless I keep tracking how much the camera has rotated about the three axes. For example, the following code results a roll angle 90, not 0.
camera->Roll(30);
camera->Roll(60);
camera->Roll(0);

However, the following code does result in a roll angle 0.
camera->Roll(30);
camera->Roll(60);
camera->SetRoll(0);

My question was why there is no similar SetAzimuth() and SetElevation() methods in the class vtkCamera() and how to achieve my goal using other methods easily.

Thank you.

Chen
  
  ----- Original Message ----- 
  From: Xiaofeng Z 
  To: Hua-Mei Chen ; vtkusers at vtk.org 
  Sent: Tuesday, September 30, 2008 11:07 PM
  Subject: RE: [vtkusers] How to set a camera's azimuth and elevation?


        Azimuth:
         
        void vtkamera::Azimuth 
       ( double  angle   )
         
        

  Rotate the camera about the view up vector centered at the focal point. Note that the view up vector is not necessarily perpendicular to the direction of projection. 

  Xiaofeng Zhao
  http://www.xzing.org 
  errare humanum est



------------------------------------------------------------------------------
  From: huameichen0523 at gmail.com
  To: vtkusers at vtk.org
  Date: Tue, 30 Sep 2008 14:46:29 -0500
  Subject: [vtkusers] How to set a camera's azimuth and elevation?



  Hi all,

      I am wondering how to set a camera's azimuth and elevation. There is a SetRoll() method in vtkCamera to set the roll of a camera. However, no similar methods exist for setting the azimuth and elevation. Does anyone know why? And how do I achieve my goal using other methods? Thank you.


  Chen



------------------------------------------------------------------------------
  Stay up to date on your PC, the Web, and your mobile phone with Windows Live. See Now 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081001/5b2b803a/attachment.htm>


More information about the vtkusers mailing list