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 

How to get parent node size in world coordinate


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General [forum]
View previous topic :: View next topic  
Author Message
arkajyotisahaindia
Newbie


Joined: 06 Apr 2013
Posts: 2

PostPosted: Wed Jul 31, 2013 6:22 pm    Post subject:
How to get parent node size in world coordinate
Reply with quote

I just started using OSG. I need to know how to get size of the parent.

Actually I have a flat UTM terrain and I need to put some object on that.
Now I have no idea about how much the child needed to be translated and logic behind it. Probably if I can get the size of the parent in OSG world then I can calculate the child position.

Generally how it is done.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53476#53476







------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11019

PostPosted: Thu Aug 01, 2013 6:30 am    Post subject:
How to get parent node size in world coordinate
Reply with quote

Hi Arka? Saha?

On 6 April 2013 14:10, Arka Saha <> wrote:
Quote:
I just started using OSG. I need to know how to get size of the parent.

You phone up your parents and ask them, or just sneak a tape measure
next time you see them :-)

Quote:
Actually I have a flat UTM terrain and I need to put some object on that.
Now I have no idea about how much the child needed to be translated and logic behind it. Probably if I can get the size of the parent in OSG world then I can calculate the child position.

You can get the bonding sphere of any node in the scene graph, and you
can get a nodes parent node via Node::getParents() and get the
boudning sphere(s) but I really don't think this is what you are after
and the "parent" in your question is probably just misleading.

Geometry in the OSG are all on the leaves so they can't be the parent
of anything. If you have a Geometry that you want to know the size of
then you can use it's bounding box, or just get the vertex array and
walk thorugh it. However, whether this is appropriate in your case I
can't say with so few details about your usage model and scene graph
construction.

Robert.


------------------
Post generated by Mail2Forum
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 [forum] 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 Convert from screen space to world sp... NavyBas General 3 Thu Jun 22, 2017 6:14 pm View latest post
No new posts How to add hello world/additional pro... tipking General 3 Mon Jun 12, 2017 10:25 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


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