Hi Guy, The OSG by default works with world coordinates with Z up, Y to the north, X to east. The loaders typically load into this orientation, and in fact for vis-sim Z is the standard and the OSG and TXP plugin confirms to this. The OSG isn't generally hardwired to Z up though and you can provide your own view matrix to orientate things to how you want, but plugins like TXP have to map directly to how terrapage sets things up, which is Z up. You'll also find that OpenFlight files are all Z up.
Personally I find the notion of Y up for a scene a bit counter-intuitive, as it mixes the notion of eye space needing to be consistent with world coordinates. Eye space and world space are two totally different coordinates frames and are best kept separate both in implementation and conceptually. So I would recommend sticking with Z up, Y to the north, X to east. Robert. On Wed, Jul 21, 2010 at 12:53 AM, Guy Volckaert <[email protected]> wrote: > While analyzing the TXNode class, I noticed that it makes a suttle assumption > that the coordinate system is Z up. Almost everyhere else in OSG it make no > such assumption (or it provides a CoordinateFrame class to convert from one > coordinate system to another such as from Z up to Y up). > > Here is a small code snipit of TxpNode: > > > Code: > > void TXPNode::updateEye(osg::NodeVisitor& nv) > { > [...] > //---- This code assumes Z up. > trpg2dPoint loc; > loc.x = nv.getEyePoint().x() - _originX; > loc.y = nv.getEyePoint().y() - _originY; > [...] > } > > > > > Is there an easy to make this work with other coordinate systems (like Y up). > > Cheers, > Guy > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=30152#30152 > > > > > > _______________________________________________ > 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

