Re: [osg-users] osg Coordinate system
Hi, ... Thank You Thank you! Cheers, Vinoth -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70863#70863 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg Coordinate system
Hi, Here you can find some snippets: https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-CIGI/IGPluginCIGI.cpp but you rotate it normaly as in flat earth and then apply the transofrmation for that geo location: osg::Matrixd l2w; osg::EllipsoidModel em; em.computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(lat),osg::DegreesToRadians(lon),alt,l2w); osg::Quat hpr; osg::Matrixd finalMatrix = osg::Matrixd::rotate(hpr) * l2w; On Sat, Apr 29, 2017 at 7:03 AM, Vinoth Rajendran < vinothrajendran4...@gmail.com> wrote: > Hi, > > ... > > yaa,Now i am getting the Up Vector.But i unable to rotate correctly my > object(entity) in scene with respect to Particular Axis. > > if it is not geocentric(flat),if i want change the heading i can make > rotate with respect to Z-axis,same pitch w.r.to X-Axis and Roll w.r.to > Y-Axis. > > But in geocentric how i can change heading,Pitch and Roll of my > Entity ? > Can anyone explain me please ? > > Thank you! > > Cheers, > Vinoth > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=70861#70861 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg Coordinate system
Hi, ... yaa,Now i am getting the Up Vector.But i unable to rotate correctly my object(entity) in scene with respect to Particular Axis. if it is not geocentric(flat),if i want change the heading i can make rotate with respect to Z-axis,same pitch w.r.to X-Axis and Roll w.r.to Y-Axis. But in geocentric how i can change heading,Pitch and Roll of my Entity ? Can anyone explain me please ? Thank you! Cheers, Vinoth -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70861#70861 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg Coordinate system
Hi Vinoth, have a look at the osg::EllipsoidModel in osg/CoordinateSystemNode .. It has all the methods to get the up vectors for specific lat/lon On Fri, Apr 28, 2017 at 2:50 PM, shayne.tueller wrote: > If you change to geocentric coordinates, the "up" vector is the normal to > the spheriod at the XYZ location. I'm not sure what you mean by the Y > coordinate. > > > Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone > > Original message > From: Vinoth Rajendran > Date: 4/28/17 5:54 AM (GMT-07:00) > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] osg Coordinate system > > Hi, > > ... > > i am using osg3.5.1 in my application.when i am running in flat terrain > mode, Z axis is Up Vector in my Scene .if i am changing to Geocentric > Mode,the Up Vector is Changing to Y axis. > > So how i can Change Up Vector in my Scene ? > > Thank you! > > Cheers, > Vinoth > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=70853#70853 > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg Coordinate system
If you change to geocentric coordinates, the "up" vector is the normal to the spheriod at the XYZ location. I'm not sure what you mean by the Y coordinate. Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone Original message From: Vinoth Rajendran Date: 4/28/17 5:54 AM (GMT-07:00) To: osg-users@lists.openscenegraph.org Subject: [osg-users] osg Coordinate system Hi, ... i am using osg3.5.1 in my application.when i am running in flat terrain mode, Z axis is Up Vector in my Scene .if i am changing to Geocentric Mode,the Up Vector is Changing to Y axis. So how i can Change Up Vector in my Scene ? Thank you! Cheers, Vinoth -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70853#70853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg Coordinate system
Hi, ... i am using osg3.5.1 in my application.when i am running in flat terrain mode, Z axis is Up Vector in my Scene .if i am changing to Geocentric Mode,the Up Vector is Changing to Y axis. So how i can Change Up Vector in my Scene ? Thank you! Cheers, Vinoth -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70853#70853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg coordinate system
Hi Peterakos, The bulk of the OSG loaders assume that world coordinates have +ve Z upwards, +ve Y north and +ve X to the east. The majority Camera Manipulators assume the world has Z up as well, then set up Camera's view matrix so the Z up aligns with vertical access of the screen, +ve Y into screen and +ve X to right. You can change the default viewing position in the camera manipulators if you wish by use the setHomePosition(..) method, or avoid the use of Camera manipulators and just set the viewer's Camera's view matrix directly using any of the Camera::setUpView*() method. Robert. On 28 December 2012 20:06, Peterakos wrote: > Hello. > > Osg uses a coordinate system in which the +y axis goes into the screen > and +z axis goes up. > Does this default matrix affects the model matrix of each object on > the scene or the view matrix of all the cameras ? > I wish i could remove this behavior. > > thnx. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg coordinate system
Hello. Osg uses a coordinate system in which the +y axis goes into the screen and +z axis goes up. Does this default matrix affects the model matrix of each object on the scene or the view matrix of all the cameras ? I wish i could remove this behavior. thnx. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org