World Wind Forums

Go Back   World Wind Forums > WorldWind .Net Development > Developers' Corner

Developers' Corner General World Wind development.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-22-2011, 09:42 AM   #1
kamimail
Junior Member
 
Join Date: Nov 2009
Posts: 1
kamimail is on a distinguished road
Default Some Questions about the WorldCamera

Hi all:
I am a novice on the camera control in WorldWind. After reading the code in SetPosition,I have some questions about it.Hope someone can help me to understand it.
the following is snippet copied from WorldCamera.cs
Code:
SetPosition(double lat, double lon, double heading, double _altitude, double tilt, double bank)
{
   //.............omit...........	
   this._targetOrientation = 
   Quaternion4d.EulerToQuaternion(MathEngine.DegreesToRadians(lon),//Yaw
			        MathEngine.DegreesToRadians(lat),//Pitch
			        MathEngine.DegreesToRadians(heading));

    Point3d v = Quaternion4d.QuaternionToEuler(this._targetOrientation);

   this._targetLatitude.Radians = v.Y;
   this._targetLongitude.Radians = v.X;
   this._targetHeading.Radians = v.Z;

}
(1)according to my knowledge , the longitude is defined by the angle of rotation around Z axis of earth. but it seems that the longitude is used as the angle for Yaw rotation, which is the rotation around Y axis of earth.
why does it work?
(2)it seems that the function above transforms the eular angles,i.e,lon,lat and heading ,to a quaterion,and then converts the quaterion back to the eular angles.why do we need to do that?what is the difference between this two kinds of eular angle?

thanks !
kamimail is offline   Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Few Questions about WorldWind WWEVALUATIONHELP WorldWind General 1 01-11-2010 09:41 PM
A few questions to start ShadowCoder Development Help 9 10-29-2009 05:48 PM
WWJ Cache questions naql Development Help 1 10-21-2009 04:11 PM
Questions using WWJ with WMS mapserver server dcoward Development Help 0 07-14-2009 05:48 PM
Questions on building with Visual C# 2008 Express Ammianus Developers' Corner 26 02-03-2009 11:23 PM


All times are GMT +1. The time now is 07:49 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.