Hi,

I do something similar to what I think you want to do.
To calcluate the rotation to be applied I use osg Matrix method 
'makeRotate(Vec3 from, Vec4 to)'. For the from I use the up axis of the model 
(in your case +ve x) and for the to I use the local up provided by the 
Ellipsoid used for the terrain.

Cheers,
Brad

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ethan Fahy
Sent: Monday, 12 December 2011 11:38 PM
To: [email protected]
Subject: Re: [osg-users] [vpb] Placing an object on a UTM file generated with 
osgdem

Object rotation is the last piece of this puzzle.  When on object is placed on 
a geocentric terrain using the methods outlined in this thread, the object 
always appears to be oriented correctly upwards with respect to the center of 
the earth.  However I'm not sure how it is being oriented with respect to its 
rotation.  Does anyone have any insight into this?  For example if I know that 
my object's internal coordinate system specifies that positive x is north and 
positive y is west and I place that object on an arbitrary WGS84, geocentric 
terrain, how will I know how to rotate the object to line up the north 
orientation?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44344#44344





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


-------------------------------------------------------------------------
DISCLAIMER: This e-mail transmission and any documents, files and 
previous e-mail messages attached to it are private and confidential.  
They may contain proprietary or copyright material or information that 
is subject to legal professional privilege.  They are for the use of 
the intended recipient only.  Any unauthorised viewing, use, disclosure, 
copying, alteration, storage or distribution of, or reliance on, this 
message is strictly prohibited.  No part may be reproduced, adapted or 
transmitted without the written permission of the owner.  If you have 
received this transmission in error, or are not an authorised recipient, 
please immediately notify the sender by return email, delete this 
message and all copies from your e-mail system, and destroy any printed 
copies.  Receipt by anyone other than the intended recipient should not 
be deemed a waiver of any privilege or protection.  Thales Australia 
does not warrant or represent that this e-mail or any documents, files 
and previous e-mail messages attached are error or virus free.  

-------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to