If you are placing objects on a UTM terrain using UTM coords, then the localToWorld matrix is a simple osg::Matrix::translate(x,y,z). If you're trying to use lat/long coords, you need to reproject then to UTM before creating this matrix. PROJ4 is the library for this, or something with PROJ4 wrappers like GDAL/OGR or osgEarth.
Ideally the CoordinateSystemNode will encode the UTM information (like the proj4 initialization string), but I don't know whether it does. Glenn Waldron / @glennwaldron On Mar 7, 2012 8:57 AM, "Ethan Fahy" <[email protected]> wrote: > So I've been successfully placing objects using the methods in this thread > for geocentric terrains, but now I need to start using UTM terrains so I > have to rethink some of this object placement code. Before I was able to > get my local-to-world matrix by using > ellipsoid::computerLocalToWorldTransformFromLatLonHeight, but with UTM I > can't use the ellipsoid model from my terrain's coordinatesystemnode. I am > aware of the osg::computeLocalToWorld function but I'm not sure how to > correctly implement this. Any tips on this? Thanks. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=46085#46085 > > > > > > _______________________________________________ > 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

