OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osg Coordinate system


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 23

PostPosted: Fri Apr 28, 2017 11:54 am    Post subject:
osg Coordinate system
Reply with quote

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
Back to top
View user's profile Send private message
shayne.tueller
Guest





PostPosted: Fri Apr 28, 2017 12:53 pm    Post subject:
osg Coordinate system
Reply with quote

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:
Subject: 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







------------------
Post generated by Mail2Forum
Back to top
Trajce Nikolov NICK
Guest





PostPosted: Fri Apr 28, 2017 1:00 pm    Post subject:
osg Coordinate system
Reply with quote

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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Date: 4/28/17 5:54 AM (GMT-07:00)
To: (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Subject: 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
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 23

PostPosted: Sat Apr 29, 2017 5:03 am    Post subject:
osg Coordinate system
Reply with quote

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
Back to top
View user's profile Send private message
Trajce Nikolov NICK
Guest





PostPosted: Sat Apr 29, 2017 9:02 am    Post subject:
osg Coordinate system
Reply with quote

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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
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
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org






--
trajce nikolov nick

------------------
Post generated by Mail2Forum
Back to top
vinothrajendran4
User


Joined: 28 Dec 2016
Posts: 23

PostPosted: Sat Apr 29, 2017 9:09 am    Post subject:
Reply with quote

Hi,

...

Thank you!

Cheers,
Vinoth
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts How to improve system performance white_water125 General 0 Tue Oct 17, 2017 6:43 am View latest post
No new posts Render Geographic/Projected coordinat... Bruno Oliveira General 0 Mon Jun 05, 2017 2:58 pm View latest post
No new posts Render point cloud in a different coo... Bruno Oliveira General 1 Mon Jun 05, 2017 1:50 pm View latest post
No new posts change default coordinate system unit vinothrajendran4 General 1 Wed May 31, 2017 5:03 am View latest post
No new posts osg plugin couldn't load an osgb or i... first_gle General 2 Sat May 27, 2017 3:52 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP