EllipsoidModel and CoordinateSystemNode also provide you with a local up vector, which will be a component of the orientation part of your MatrixTransform. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> +1 303 859 9466
_____ From: [email protected] [mailto:[email protected]] On Behalf Of Glenn Waldron Sent: Saturday, February 28, 2009 3:04 PM To: [email protected] Subject: Re: [osg-users] Coordinates in VPB database Re #1: Your whole-earth database is in geocentric (earth-centered XYZ) coordinates. In the class osg::EllipsoidModel (in osg/CoordinateSystemNode) there are functions to convert from lat/long to geocentric and back. You can these to calcuate the XYZ at which to place your model. Then use the XYZ to create an osg/MatrixTransform, and put your model node under it. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Sat, Feb 28, 2009 at 4:53 PM, B. McMahan <[email protected]> wrote: Pardon the elementary question...I'm a newbie with OSG and VPB. I've search around but haven't found a simple example that illustrates what I'd like to do. Essentially, I've built a VPB whole-earth database and got it loaded in my application. There are two things I'd like to do at this point: 1) Place a model at some point relative to the earth by latitude, longitude, and possibly altitude. 2) Perform an intersection test from the mouse cursor to find the latitude and longitude of the point on the earth's surface that the mouse is intersecting with. In short, if the mouse is hovering over the planet's surface, transform that point from screen coords to world coordinates, and then convert to lat/lon. At this point, given my little experience with OSG at the moment on how to proceed. I'm really not looking for hand-outs...but if you can point me to a simple (easily digestible) example I'd be just as grateful. Thank you in advance! ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=7694#7694 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

