How to set a camera's azimuth and elevation?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to set a camera's azimuth and elevation?

Hua-Mei Chen
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
 

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to set a camera's azimuth and elevation?

Xiaofeng Z
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: [hidden email]
To: [hidden email]
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
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to set a camera's azimuth and elevation?

Hua-Mei Chen
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 -----
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: [hidden email]
To: [hidden email]
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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to set a camera's azimuth and elevation?

Xiaofeng Z
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 Zhao
http://www.xzing.org
errare humanum est





From: [hidden email]
To: [hidden email]; [hidden email]
Subject: 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 -----
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: [hidden email]
To: [hidden email]
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


Stay up to date on your PC, the Web, and your mobile phone with Windows Live. See Now
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Max
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to set a camera's azimuth and elevation?

Max
Hi all,
No need to track the movement, better solution is:
Create a function such that:
1. Creates a new camera.
2. Deep copies the current active camera to it.
3. Sets its properties(position rotation etc)

Now each time when camera init is needed call this function.

Max
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get camera's azimuth and elevation?

gvvardhan
This post has NOT been accepted by the mailing list yet.
In reply to this post by Hua-Mei Chen
how to get the present values of azimuth and elevation ?
Loading...