Tony, In answer to your question, you want to do the former. Assuming you have a geocentric database, you must convert your lat,lon,elev to a geocentric X,Y,Z (i.e. origin is the center of the earth) and then use these coordinates to set the position accordingly...
Osg::Matrix position;
earth->computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(l
at),
Osg::DegreesToRadians(lon), elev, position);
transform->setMatrix(position);
"transform" is the node that is part of the entity class I discussed
earlier. If you want your entity to move along, you'll need to update the
code above in an update callback...
-Shayne
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tony Vasile
Sent: Sunday, February 07, 2010 8:01 PM
To: [email protected]
Subject: Re: [osg-users] Example of geographical position
Hi Shayne,
Excuse my newbie status so how do I set up the MatrixTransform do I just
use the latitude, longitude and altitude as a translation or do I just set
the position of my vehicle using the latitude, longitude to set the position
of the vehicle some how.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

