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

Xiaofeng Z xf10036 at hotmail.com
Wed Oct 1 13:32:19 EDT 2008


Because Azimuth is a movement whilst Roll is an intrinsic property of the camera?
 
Azimuth is dependent on the entire setting.  e.g, if you Azimuth +90, change the focal point, and Azimuth -90, you may not get to your original position.Xiaofeng Zhaohttp://www.xzing.org errare humanum est



From: huameichen0523 at gmail.comTo: xf10036 at hotmail.com; vtkusers at vtk.orgSubject: Re: [vtkusers] How to set a camera's azimuth and elevation?Date: Wed, 1 Oct 2008 05:17:56 -0500



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 Zhaohttp://www.xzing.org errare humanum est

From: huameichen0523 at gmail.comTo: vtkusers at vtk.orgDate: Tue, 30 Sep 2008 14:46:29 -0500Subject: [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 
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081001/b0c85530/attachment.htm>


More information about the vtkusers mailing list